5 Replies Latest reply on Aug 3, 2009 12:47 PM by rouelf_1

    Obtain a table occurrence name and use it in a "Set Field" script step

    rouelf_1

      Title

      Obtain a table occurrence name and use it in a "Set Field" script step

      Post

      I have a solution where a script is duplicated many times; however, the only difference is the name of a table occurrence changes, everything else stays the same. See example below.  The script is triggered by clicking on records on portals that refer to table occurrences (TableOccurence_1, below). Would like to use one script that has the table occurrence determined dynamically to replace so many essentially duplicate scripts.

      Script 1:
      Go To Portal Row [Select; No Dialog; Get (PortalRowNumber)]
      Set Field [Table_A::FieldName_Aa; TableOccurence_1::FieldName_Bb]
      Set Field [Table_C::FieldName_Cc; TableOccurence_1::FieldName_Bbb]
      Perform Script ["XXXX"]

      Script 2:
      Go To Portal Row [Select; No Dialog; Get (PortalRowNumber)]
      Set Field [Table_A::FieldName_Aa; TableOccurence_2::FieldName_Bb]
      Set Field [Table_C::FieldName_Cc; TableOccurence_2::FieldName_Bbb]
      Perform Script ["XXXX"]