Brian Dunning's FileMaker Custom Functions

JSON.List_Tables

Lists all Table information in JSON format

  Be the first to rate this function Log in to vote

Kyle Williams   Kyle Williams - Show more from this author
Dreamclinic Massage
http://www.dreamclinic.com

Share on Facebook Share on Twitter

  Sample input:
JSON.List_Tables()
  Sample output:
{
"TableIDs" :
{
"1065548" :
{
"BaseFileName" : "DC_Invoices (DREAMDC01)",
"BaseTableName" : "BatchForQBTransfer",
"ID" : 1065548,
"ModCount" : 98,
"Name" : "batchFor_Invoice.LineItemsAll"
},
"1065549" :
{
"BaseFileName" : "DC_Clients (DREAMDC01)",
"BaseTableName" : "GLOBALS",
"ID" : 1065549,
"ModCount" : 12,
"Name" : "GLOBALS"
}
},
"TableNames" :
{
"AA_Locations" :
{
"BaseFileName" : "DCOS (DREAMDC01)",
"BaseTableName" : "AA_Locations",
"ID" : 1065385,
"ModCount" : 160,
"Name" : "AA_Locations"
},
"ACUinfo" :
{
"BaseFileName" : "DC_Invoices (DREAMDC01)",
"BaseTableName" : "ACUinfo",
"ID" : 1065322,
"ModCount" : 35,
"Name" : "ACUinfo"
}
}

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

It is always important to reference everything dynamically because static names and references are always changing. this function allows you to use JSON functions to extract the information you need for any table.

 

Comments

Kyle Williams   Kyle Williams, Dreamclinic Massage
Feb 29, 2020
Easy way to get all info for your current layouts Table:
JSONFormatElements ( JSONGetElement ( JSON.List_Tables, "TableNames." & get(LayoutTableName ) ))
Returns:
{
"BaseFileName" : "DC_Invoices",
"BaseTableName" : "INVOICES",
"ID" : 1065089,
"ModCount" : 1097,
"Name" : "DC_INVOICES"
}
 
Kyle Williams   Kyle Williams, Dreamclinic Massage
Feb 29, 2020
Current Layout's BaseTableName:
JSONGetElement ( JSON.List_Tables, "TableNames." & get(LayoutTableName ) & ".BaseTableName" )
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 16 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: