1 of 1 people found this helpful
GetFieldName will work on any field from any table occurrence in your file, related or not. So you do not need to add a table occurrence and a relationship for it to work.
I've set up my own similar system for ExecuteSQL. If you'd like to see how I do it, check out the "Flexible SQL" tab inside "Button Bars as Value Lists" in:
any ExecuteSQL() must have a record in a table (even if no data). Tables with NO records will cause the query to fail. You can have a table with one field (global or otherwise) and it can be used for queries. But it must have at least one record created.
that's just the way it is.
I did extensive testing as did other developers when this function was introduced. We had NO documentation other than what was in FM Help.