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
- New YourCause Community TEST
- New SKY Community TEST
- New Grantmaking TEST Community
- New Altru Test Community
- New bbcon Community - TEST
- 12 Blackbaud Agents for Good™
- New Raiser's Edge NXT Community
- 7 Blackbaud Community Help
- 218 bbcon®
- 1.4K Blackbaud Altru®
- 409 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.2K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 16 donorCentrics®
- 361 Blackbaud eTapestry®
- 2.7K Blackbaud Financial Edge NXT®
- 681 Blackbaud Grantmaking™
- 599 Blackbaud Education Management Solutions for Higher Education
- 3.3K Blackbaud Education Management Solutions for K-12 Schools
- 952 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 85 JustGiving® from Blackbaud®
- 7K Blackbaud Raiser's Edge NXT®
- 3.9K SKY Developer
- 257 ResearchPoint™
- 123 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 247 Member Lounge (Just for Fun)
- 40 Blackbaud Community Challenges
- 37 PowerUp Challenges
- 3 (Closed) PowerUp Challenge: Grid View Batch
- 3 (Closed) PowerUp Challenge: Chat for Blackbaud AI
- 3 (Closed) 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
- 822 Community News
- 3.1K Jobs Board
- 57 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)

