DataPro Posted September 15, 2004 Posted September 15, 2004 I need to do the following type of logic: IF AAA = "XXX" AND: IF B <> "" then X = B IF C <> "" then X = C etc. ENDIF IF BBB = "XXX" AND: IF B <> "" then Y = B IF C <> "" then Y = C etc. ENDIF Is there a good way to nest IF statements? If so, please give an example of the FMP code needed. TIA
-Queue- Posted September 15, 2004 Posted September 15, 2004 I'm assuming you're referring to the If script step and not the If calculation function. If I'm correct, then you want something that looks like If [AAA = "XXX"] If [not IsEmpty(:] Set Field [X; B] Else If [not IsEmpty©] Set Field [X; C] etc. End If End If End If If you're only setting one field in your nested steps, then you can combine them like Set Field [X; Case( AAA = "XXX"; Case( not IsEmpty(; B; not IsEmpty©; C ) )] If AAA does not equal "XXX", then no result will be returned, nor will there be a result if B, C, etc. are all empty.
Recommended Posts
This topic is 7377 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now