why not just use the field name itself? GetFieldName is looking for an actual field like people::id not "people::id". This is also an advantage because if you change the name its automatically updated in the calculation.
Set Variable [$$FieldName ; Get(ActiveFieldTableName & "::" & Get(ActiveFieldName)]
But what's the application? Why do you want to do this?
Note also that by referencing the active field, you are talking about the field with the cursor in it at the time the calc is performed, is that your intention?
Thank you for your reply. I am writing a script trigger that I want to apply to a large number of related fields so I can get the field contents of those related fields using the GetField function i.e., so I can attach a single script trigger to those fields rather than write a literal string for each field.
Sorry, I missed your reply. Trust my reply to Jared part-explained my intention.
I am comparing the existing contents of a related field (this I can do with an existing scripting by setting a $$FieldContent variable) with what may or not be a valid new entry in that field according to various criteria. Once this comparison is done, if it passes the test then the related field is left alone, otherwise the field is reverted back to its previous value using the data in the $$FieldContent variable.
It just seemed easier to do it this way rather than use literal field names. Do you reckon this will work when I use the SetFieldByName function to reset the related field named by the $$FieldName variable to its original value?
Thank you so much for your solution - no more question marks!