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.
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.