AnsweredAssumed Answered

Issues with Set Field By Name

Question asked by CharlieS on May 25, 2016
Latest reply on May 25, 2016 by CharlieS

Hey Guys,


I'm having an issue with the Set Field By Name script step. I have created a History table to store unchanging revisions of records in a few main tables. I created a loop and hoped to use SetFieldByName to copy the data into the History table. When I run the script, I get a "this action cannot be performed because the required table is missing" error. I cannot figure out where my error lies in the script.


Here is the relevant part of the script :


   Set Variable [ $StartField ; Value:Get ( ActiveFieldName ) ]


      Set Variable [ $CurrentField ; Value:Get ( ActiveFieldName ) ]

      Set Variable [ $CurrentDestination ; Value:"\"" & "HISTORY::P_" & $CurrentField & "\"" ]

      Set Variable [ $CurrentContents ; Value:Get ( ActiveFieldContents ) ]

      Set Field By Name [ $CurrentDestination; $CurrentContents ]

      Go to Next Field

      Exit Loop If [ Get ( ActiveFieldName ) = $StartField ]

   End Loop


FYI, The 'P_' is part of the field name in the History table. This loop is for the Pricing Table backup. I created a specific layout with only the Pricing table fields that I want to backup.


Thanks for any help,


Charlie S.