1 Reply Latest reply on Dec 9, 2013 12:42 PM by erolst

    Eliminate tablename in Set  Field script stp

    lkeyes

      I have a bunch of tables with identical field names that I want to run a script on. The script changes the contents of a series of fields to upper case.

      My problem is that the script seems to insist on including the table name in the Set Field command. Can I eliminate the necessity of the table name? Otherwise I must edit the script to run it on a new table.

       

      Example

       

      Go to Record/Request/Page [First]

      Loop

      Set Field [LGL2013::lastName; UPPER(LGL2013::lastName)]

      Set Field [LGL2013::firstName; UPPER(LGL2013::firstName)]

      Go to Record/Requst/Page [Next; Exist afgter last]

      End Loop

       

      I want to eliminate LGL2013:: and just includethe field names.

      Otherwise, I need to edit the script (in the usual painful way, without a search and replace function)

      to reflect the table name of the next table that I'm "upper casing".

       

      Ideas? TIA.

       

      ---- L

        • 1. Re: Eliminate tablename in Set  Field script stp
          erolst


          lkeyes wrote:

          Can I eliminate the necessity of the table name?  Otherwise I must edit the script to run it on a new table.

          I want to eliminate LGL2013:: and just includethe field names.

           

          Try

          Set Variable [ $fieldName ; Get ( LayoutTableName ) & "::yourFieldName" ]

          Set Field by Name [ $fieldName ; Upper ( GetField ( $fieldName ) ) ]

           

          You could also put the field names into a list and process them within an inner loop.