September 15, 200421 yr 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
September 15, 200421 yr 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.
Create an account or sign in to comment