If then else statement help
I am trying to write a formula to display the pledge Balance if it is null then the Payment amount if it is null then the Scheduled installment if there is none then the outright gift
//ie Ted paid $32,507. This was applied to a $50,000 installment and the remainder to the next installment of $12,500 this means CR shows:
// the first balance as $0 with a $32,507 payment
// the next installment shows a balance of $11,994
//the next installment is $12,500
//so I want the formula to display:
//$32,507 then the next line $11,994 and the next line $12,500
//what the formula below displays is: $0 the next line $11994 and the next line is $12500
//this means the formula is not showing the payment
What am I doing wrong? Here is my formula:
if not isnull ({CnGf_1Ins_1.CnGf_1Ins_1_Balance}) //installment balance to catch partial payments
then {CnGf_1Ins_1.CnGf_1Ins_1_Balance}
else If not isnull ({CnGf_1Ins_1Py_1Gf.CnGf_1Ins_1Py_1Gf_Amount}) // pledge payment
then {CnGf_1Ins_1Py_1Gf.CnGf_1Ins_1Py_1Gf_Amount}
else if not isnull ({CnGf_1Ins_1.CnGf_1Ins_1_Amount}) //scheduled installment
then {CnGf_1Ins_1.CnGf_1Ins_1_Amount}
else {CnGf_1.CnGf_1_Amount} //outright gift
//ie Ted paid $32,507. This was applied to a $50,000 installment and the remainder to the next installment of $12,500 this means CR shows:
// the first balance as $0 with a $32,507 payment
// the next installment shows a balance of $11,994
//the next installment is $12,500
//so I want the formula to display:
//$32,507 then the next line $11,994 and the next line $12,500
//what the formula below displays is: $0 the next line $11994 and the next line is $12500
//this means the formula is not showing the payment
What am I doing wrong? Here is my formula:
if not isnull ({CnGf_1Ins_1.CnGf_1Ins_1_Balance}) //installment balance to catch partial payments
then {CnGf_1Ins_1.CnGf_1Ins_1_Balance}
else If not isnull ({CnGf_1Ins_1Py_1Gf.CnGf_1Ins_1Py_1Gf_Amount}) // pledge payment
then {CnGf_1Ins_1Py_1Gf.CnGf_1Ins_1Py_1Gf_Amount}
else if not isnull ({CnGf_1Ins_1.CnGf_1Ins_1_Amount}) //scheduled installment
then {CnGf_1Ins_1.CnGf_1Ins_1_Amount}
else {CnGf_1.CnGf_1_Amount} //outright gift
Tagged:
0
Comments
-
Joshua Bekerman bCLO bCRE - Any thoughts on Keri's issue?0
-
So I found my answer. as 0 is not null I needed to change the formula to:
if (isnull ({CnGf_1Ins_1.CnGf_1Ins_1_Balance})) then {CnGf_1.CnGf_1_Amount}
else if ({CnGf_1Ins_1.CnGf_1Ins_1_Balance} >0) //installment balance to catch partial payments
then {CnGf_1Ins_1.CnGf_1Ins_1_Balance}
else If ({CnGf_1Ins_1Py_1Gf.CnGf_1Ins_1Py_1Gf_Amount} >0) // pledge payment
then {CnGf_1Ins_1Py_1Gf.CnGf_1Ins_1Py_1Gf_Amount}
else if ({CnGf_1Ins_1.CnGf_1Ins_1_Amount} >0) //scheduled installment
then {CnGf_1Ins_1.CnGf_1Ins_1_Amount}
3
Categories
- All Categories
- 6 Blackbaud Community Help
- 209 bbcon®
- 1.4K Blackbaud Altru®
- 395 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 15 donorCentrics®
- 360 Blackbaud eTapestry®
- 2.5K Blackbaud Financial Edge NXT®
- 648 Blackbaud Grantmaking™
- 567 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 937 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.5K Blackbaud Raiser's Edge NXT®
- 3.7K SKY Developer
- 247 ResearchPoint™
- 118 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 239 The Tap (Just for Fun)
- 33 Blackbaud Community Challenges
- 31 PowerUp Challenges
- 3 (Open) PowerUp Challenge: Data Health
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Product Update Briefing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports+
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Email Marketing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Gift Management
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Event Management
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Home Page
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Query
- 782 Community News
- 2.9K Jobs Board
- 53 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)

