Passing Field Names to ExecuteSQL
I’m trying to check for values in all user fields in a record, but ignore auto-entry and global fields. I’ve used ExecuteSQL( ) to get a comma-separate list of the appropriate field names and place it in a FileMaker variable called $FieldList, but when I try to parse that field list into a second ExecuteSQL( ) statement, I get a parse error. What am I doing wrong?
Here’s a sample of the value I’ve got stored in $FieldList:
description, nameGeneric, nameBrand, IDNumber
For the second calculation, I’ve tried:
I’ve even tried a nested SELECT statement, but that didn’t work either.
Well, I wound up answering my own question. I simply added another script step to quote every field name, setting $FieldList to:
"\"" & Substitute( $FieldList; ¶; Quote(", ") ) & "\""
It works perfectly now. Thanks to all who looked!