I'm still very new to the formula syntax, and am hoping to achieve a series of nested IF statements. I'm a bit more experienced with bash, and what I'm trying to achieve would look something like this with that syntax:
if [ $GiftAidEligible ]; then
if [ $PaymentType = "CAFDonate" ]; then
GiftAidAmount=$(GrossAmount*0.25)
elif [ $PaymentType = "JustGiving" ]; then
GiftAidAmount=$(GrossAmount*0.2375)
else
GiftAidAmount=$(Amount*0.25)
fi
else
GiftAidAmount=NULL
fi
The field I'm trying to calculate with the above is called GiftAidAmount, a currency formula. The related static fields are:
-GiftAidEligible: A checkbox
-PaymentType: a picklist of string values
-GrossAmount: a currency field denoting the donation amount before fees
-Amount: another currency field denoting the donation amount after fees
I can explain the logic in a bit more detail if needed, but ultimately I'm after some help getting the above logic in to the correct syntax for my formula. Any pointers would be much appreciated.