2 Replies Latest reply on Mar 25, 2011 9:49 AM by philmodjunk

    Perform Script based on field value

    jetmaster

      Title

      Perform Script based on field value

      Post

      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"]

      else

      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.