FM can 'Set field by name'. How can I 'Get field by name'? I have constructed a variable name in a script that matches a field name and want to get the value of that field.
you might be able to the object use go to object then get active field contents. This introduces dependencies on the right layout and the correct object is on the layout. I'm not even sure go to object puts the focus on the field so that get active field contents will work. You'll have to test.
Another way to go would be to use ExecuteSQL to select the exact data you need.
did you construct the name of the field name including its source table ?
The Function GetField is the converse of Set Field By Name. Evaluated can also be used to "read" the contents of a field identified by name in text format instead of by the internal IDs associated with a given field reference that is more typically used in FileMaker calculations.
Thanks for the confirmation Phil. I thought GetField was the answer, but I couldn’t get it to work. With your assurance, I finally found the typo in a field name I was building in the script.
Retrieving data ...