Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.0   7.1   7.2   7.3   7.4   7.5   8.0   8.1   8.2   8.3    Statistic  

FM.TableStatistics

Queries statistics on a table.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
FM 8.2 Yes Yes Yes Yes Yes

MBS( "FM.TableStatistics"; FileName; TableName )

Parameters

Parameter Description Example value
FileName The target database name.
Can be empty to not limit query to one database.
""
TableName The name of the table to check. "Contacts"

Result

Returns OK or error.

Description

Queries statistics on a table.
The plugin will walk over all records and count fields with various data types and how many empty fields are there.
We sum up the length of all text in text fields as well as the text content of all fields.
We sum up the size of all internal containers, so ContainerByteSize + AllTextLengths*2 plus some metadata is the size of the database file.
For internal containers we also count the streams inside, so you know how many JPEGs and other file types are in the table.

e.g.
{
"FileName":"",
"TableName":"Contacts",
"RecordCount":4,
"MinRowID":1,
"MaxRowID":4,
"ColumnCount":35,
"CountText":20,
"CountEmpty":107,
"CountNumber":5,
"CountDate":2,
"CountTime":1,
"CountTimestamp":1,
"CountContainer":4,
"CountExternalContainer":1,
"ContainerByteSize":1162565,
"TextLengths":132,
"AllTextLengths":365,
"CountDPI_":2,
"SizeDPI_":8,
"CountFNAM":3,
"SizeFNAM":90,
"CountSIZE":2,
"SizeSIZE":8,
"CountPNGf":1,
"SizePNGf":727569,
"CountFILE":1,
"SizeFILE":390,
"CountJPEG":1,
"SizeJPEG":434606
}

Examples

Check statistics:

MBS( "FM.TableStatistics"; "Contacts.fmp12"; "Contacts" )


FM.StopScriptIdle   -   FM.UpdateRecord

Feedback: Report problem or ask question.




Links
MBS FileMaker tutorial videos