AnsweredAssumed Answered

using global variable as field name

Question asked by johnhorner on Apr 1, 2010
Latest reply on Apr 1, 2010 by philmodjunk

Title

using global variable as field name

Post

i am having a little trouble getting some global variables to cooperate.  here is the problem:

 

i have a script which sets a global variable, $$PreviousFieldName, and this works correctly (as determined by looking at it's value with the script debigger/data window) and sets it's value to "Convention_1", for example.  now, after performing various other tasks, i want to set another variable which will give me the current contents of the previous field, "Convention_1" (as these contents may have changed since $$PreviousFieldName was set).

 

i tried to use this expression:

 

set variable [ $$CurrentFieldContents ; Value: $$PreviousFieldName ]

 

but instead of giving me the contents of the field, it gives me the field name so that $$CurrentFieldContents = "Convention_1" and not the value contained in "Convention_1".  i  have also tried using this expression:

 

set variable [ $$CurrentFieldContents ; Value: $$ActiveFieldTableName & "::" & $$PreviousFieldName ]

 

but still no success.

 

does anyone knnow how to do this correctly?  thanks.

Outcomes