8 Replies Latest reply on Jun 21, 2016 2:32 PM by siplus

    Is Set Field By Name [$fieldName[$rep] ... possible?

    G T

      Hello,

       

      Can this script step be done?

       

      $value = 1

      $fieldName = GetFieldName ( Projects::ProgressBar ) // repeating field

      $rep = Count ( GetField ( $fieldName ) ) + $value // first empty repetition number

       

      Set Field By Name [$fieldName[$rep]; GLOBAL::PROGRESSBAR_FILL]

      --- Returns error #102: Field is missing

       

      Set Field By Name [$fieldName & "[" & $rep & "]"; GLOBAL::PROGRESSBAR_FILL]

      --- Returns error #201

       

      Thank for any help,

      Greg

       

      Postscript: My goal is to create a single script that can modify a repeating field used as a status bar in multiple tables or contexts without the need for un-stored calculations.

       

      Message was edited by: G T