fm.table.list.unique ( )

Function stats

Average user rating
37
356
9999
Support
FileMaker 10.0 +
Date posted
19 July 2013
Version
1
Recursive function
No

Author Info
 Fabrice

74 functions

Average Rating 4.4

author_avatar



 

Function overview

Prototype

fm.table.list.unique  (  )


Parameters

No parameters for this function.


Description

Tags:  Table Occurrence   sql   List   Design   Base Tables List  

Returns a list of table occurrences with 1 item per Base table (or none if there is no table occurrence)
TOs with a missing table result in an empty item
The TO name returned is the first in alphabetical order

Requires FileMaker 12

Examples

Sample input

fm.table.list.unique


Sample output

contacts_firstTOinAlphaOrder
companies_firstTOinAlphaOrder
invoices_firstTOinAlphaOrder

 

Function code

/* fm.table.list.unique ()

by Fabrice Nordmann, 1-more-thing
Twitter: 1morethingtweet
http://www.1-more-thing.com

v1 - Jul 2013

Returns a list of table occurrences with 1 item per Base table (or none if there is no table occurrence)
TOs with a missing table result in an empty item
The TO name returned is the first in alphabetical order

Requires FileMaker 12
*/

ExecuteSQL ( "SELECT MIN ( TableName ) FROM FileMaker_Tables GROUP BY BaseTableName" ; "" ; "" )

// ===================================
/*

    This function is published on FileMaker Custom Functions
    to check for updates and provide feedback and bug reports
    please visit http://www.fmfunctions.com/fid/356

    Prototype: fm.table.list.unique( )
    Function Author: Fabrice (http://www.fmfunctions.com/mid/37)
    Last updated: 19 July 2013
    Version: 1

*/
// ===================================