AnsweredAssumed Answered

Perform Find - reference layoutname with variable or script parameter

Question asked by rudihoremans on Sep 29, 2015
Latest reply on Sep 29, 2015 by flukey

In a script that should be re-used for several tables within the same solution, I have a Script Parameter that identifies part of the name of a table. For exemple: Script Parameter passed = "2015" (obviously the year).

In the course of the script this parameter is referenced several times to go to the specific table and or field: exemple:

Go to Layout [ "Z_LongList_" & GetAsText ( Get ( ScriptParameter ) ) ] - to go to layout "Z_LongList_2015"


Then I would like to perform a find: [ "Z_LongList_2015::EAN" = $EAN ]

(hardcoding works just fine; but I would like to re-use the same script just changing the parameter to "2016" for next year's routines. Cannot find a way to reference the layoutname by using the parameter).


If [ Get ( FoundCount ) = 1 ]

Set Field By Name: [ "Z_LongList_" & GetAsText ( Get ( ScriptParameter ) ) & "::EAN_Scanned" ; $EAN ]

(rest of script where several comparable operations take place).


Any suggestions welcome.