Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How can I create a SQL query that grabs all field names in all tables?

Featured Replies

How can I create a SQL query that grabs all field names in all tables (without being required to put the fields on a layout)?

 

 

I would like each row to have the following information:

table name | field name | field type | field comments

I found this custom function but it only returns the field names from a single table:

ExecuteSQL ( "SELECT FieldName FROM FileMaker_Fields WHERE TableName='" & TableOccurrenceName & "' ORDER BY FieldName" ; "" ; ""  )

Try

ExecuteSQL ( " 
  SELECT TableName, FieldName, FieldType
  FROM FileMaker_Fields 
  WHERE TableName IN ( SELECT DISTINCT BaseTableName FROM FileMaker_Tables ) 
  ORDER BY FieldName
  " ; " | " ; ""  
)

There doesn't seem to be a SQL attribute for field comment, though; you'd have to take the list and pass each row's appropriate values to FieldComment(), either using a CF or a script.

  • Author

Thanks eos, that works great

  • 1 month later...
  • Author

Thanks for the link Beverly.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.