AnsweredAssumed Answered

Perform Script based on field value

Question asked by jetmaster on Mar 24, 2011
Latest reply on Mar 25, 2011 by philmodjunk


Perform Script based on field value


I have a pop menu with the selection being the value of a global text field gReports. On making that menu selection I want to Perform Script of the same name as the field value. I don't want to have a long IF ELSE script for the various reports like I do now. I'd rather have the proper script performed simply based on the menu selection/field value.

Instead of:

if gReports = "report one"

perform script ["report one"]


if gReports = "report two"

perform script ["report two"]

have something like this instead:

perform script [gReports]

I just don't know how to know the correct way to format that command.

Thanks for any help.