ListFieldsFromTable ( TableOccurrenceName )
Returns a sorted list of all Field Names for specified Table Occurrence in the current FileMaker Pro v12 file (Table Occurrence can reference external files)
Average rating: 4.3 (36 votes) Log in to vote
Andrew Duncan - Show more from this author
Databuzz https://www.databuzz.com.au |
Company
Contact Name
Contact Name Labels
Fax
First
Group
Home Address 1
Home Address 2
Home City
Home Country
Home Email
Home Phone
Home Postal Code
Home State
IM
Initial
Job Title
Last
Location GPS | iOS
Map from URL | Container
Mobile Phone
Notes
Photo Placeholder
Photo | Container
Print Selector | iOS
QuickFind | iOS
Result Label Plural
Reverse Geocoding Address | iOS
Sort List Key
Sort Selection
Title
Website
Work Address 1
Work Address 2
Work Address Short
Work City
Work Country
Work Email
Work Phone
Work Postal Code
Work State
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Returns a sorted list of all Field Names for specified Table Occurrence in the current FileMaker Pro v12 file (Table Occurrence can reference external files). Requires FileMaker Pro v12 or higher
Comments
Jose, San Jose Sep 14, 2012 |
||
Great function - thanks | ||
Joshua Willing Halpern, Los Angeles Nov 21, 2016 |
||
Hey I never use them personally but does anyone have a solution that lists each repetition of repeating fields too? | ||
St. Mellios, Greece Nov 11, 2017 |
||
Is it possible to add the FieldComment functionality into this function? Thanks |
||
Andrew Nov 12, 2017 |
||
Joshua, If you use this syntax: ExecuteSQL ( "SELECT * FROM FileMaker_Fields" ; "" ; "" ) it will return additional information about the fields, not just the field name like the above custom function. For repeating fields you will get details like this: Contacts,Address,varchar[20],66,Normal,20,2 where [20] is the number of repetitions. |
||
Andrew Nov 12, 2017 |
||
The FileMaker_Fields virtual table doesn't return the value for the Field Comment unfortunately - you still have to use the FieldComment function to retrieve this. You could combine these so that you could query the FileMaker_Tables and then the FileMaker_Fields for each table, and build up a list of fields to pass to the FieldComment function, e.g. something like this FieldComment ( Get ( FileName ) ; GetFieldName ( tableName::fieldName ) ) This blog post has some more details about querying the virtual tables like the above custom function for both tables and fields: https://www.databuzz.com.au/using-executesql-to-query-the-virtual-schemasystem-tables/ |
||
St. Mellios, Greece Nov 13, 2017 |
||
You 're amazing. Thank you!!! |
||
Clayton King Feb 21, 2021 |
||
Feeling quite dense here, but for my life, I can't figure out how to actually implement this, and it would be useful in a multi-table, multi-relationship project I'm developing. | ||
Andrew Duncan, Databuzz Feb 21, 2021 |
||
Hi Clayton, Start by adding the custom function to your FileMaker file, then you can reference this custom function in a calculation. For example you could have a script that sets a variable/field with this calculation: ExecuteSQL ( "SELECT * FROM FileMaker_Tables" ; "" ; "" ) This blog post has some further examples: https://www.databuzz.com.au/using-executesql-to-query-the-virtual-schemasystem-tables/ as does this post on filemakerhacks: https://filemakerhacks.com/2021/01/18/file-ids-table-ids-and-field-level-schema/ |
||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.