Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to add this definition to an expression. Can someone tell me where I'm making a mistake?
= IF ((SubStringCount(Concat([Purchase Threshold], '|'),'A') AND GetSelectedCount([Purchase Threshold]) <> 0 AND (Commitment_Amount)<=3500, SUM(Commitment_Amount)), IF (SubStringCount(Concat([Purchase Threshold], '|'),'B') AND GetSelectedCount([Purchase Threshold]) <> 0 AND (Commitment_Amount)>3500, SUM(Commitment_Amount)))
Couple of things I would change:
=If(
SubStringCount(Concat(DISTINCT [Purchase Threshold], '|'),'A') = 1 and
GetSelectedCount([Purchase Threshold]) <> 0 and
Commitment_Amount <= 3500, SUM(Commitment_Amount),
If(
SubStringCount(Concat(DISTINCT [Purchase Threshold], '|'),'B') = 1 and
GetSelectedCount([Purchase Threshold]) <> 0 and
Commitment_Amount > 3500, Sum(Commitment_Amount)
)
)
Thanks, Sunny. One more question.
If I want to say If (the option selected in my listbox is 'A'), how would I write that?
If (GetSelected ([Purchase Threshold]) = 'A')
Is this right?
You can use GetFieldSelections() function:
GetFieldSelections([Purchase Threshold])
Thanks so much.
OK now I have this. Where am I making a mistake again?
=If(
GetFieldSelections([Purchase Threshold]) = ‘Micropurchase (<=$3500)’ and
Commitment_Amount <= 3500, SUM(Commitment_Amount),
If(
GetFieldSelections([Purchase Threshold]) = ‘Simplified (>$3500)’ and
Commitment_Amount > 3500, Sum(Commitment_Amount)
)
)
If you have more than one value selected in a field GetFieldSelections() will return each values separated by a comma.
I think your expression may be wrong for the data you have selected. If you could attach an example