Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If-Then Statement Help

Status
Not open for further replies.

lm1340

Technical User
Apr 27, 2015
29
US
I am struggling to write a conditional statement that would allow me to write a different sentence in one field based on several different fields, and potentially building that sentence.

If the gift type is {Gift-in-Kind} then "Sentence about gift-in-kind."
If the gift type is {Stock} then "Sentence about stock."
If the gift (any type) has a code of {Auction}, then "Sentence about auction (and potentially gift in kind or stock)."
If the gift (any type) is linked to a membership, then "Membership note (and any of the above)."
If the gift doesn't meet any of these criteria, then "Sentence about no goods or services received."

Is this even possible?!

 
You have pretty much got it provided you know contents of Gift Type field then something like the following will work

If it is not based on contents of the field then you will need to give more info

If {GiftTypeField} = 'Gift-in-Kind' then "Sentence about gift-in-kind."
else
If {GiftTypeField} = 'Stock' then "Sentence about stock."
else
If {GiftTypeField} = 'Auction' then "Sentence about auction (and potentially gift in kind or stock)."
else
If {GiftTypeField} = 'membership' then "Membership note (and any of the above)."
else
"Sentence about no goods or services received."
 
You may need to change the order of your ifs.

Right now if the type is Stock or In Kind, then you would get that sentence, even if the person is a Member.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top