SWITCH and CASE
Posted: 09 Jan 2014, 13:08
Is there anyway to use the SWITCH statement in the expression editor?
I can do this:
PURCHASE_ORDER.TAKEN_BY = "seanm" ? "Sean Maxfield" :
PURCHASE_ORDER.TAKEN_BY = "MANAGER" ? "Manager" :
PURCHASE_ORDER.TAKEN_BY = "bobh" ? "Bob Huxtable" :""
But what I want to do is this:
Switch PURCHASE_ORDER.TAKEN_BY
Case "Seanm"
? "Sean Maxfield"
Case "MANAGER"
? "Manager"
etc.
End
But this does not work, the systax is incorrect, although there is an example of this in the report designer online help!!
I can do this:
PURCHASE_ORDER.TAKEN_BY = "seanm" ? "Sean Maxfield" :
PURCHASE_ORDER.TAKEN_BY = "MANAGER" ? "Manager" :
PURCHASE_ORDER.TAKEN_BY = "bobh" ? "Bob Huxtable" :""
But what I want to do is this:
Switch PURCHASE_ORDER.TAKEN_BY
Case "Seanm"
? "Sean Maxfield"
Case "MANAGER"
? "Manager"
etc.
End
But this does not work, the systax is incorrect, although there is an example of this in the report designer online help!!