cfLayoutLister ( whichFile ; counter ; fieldName ; onlyLayouts ; result )
List layouts and fields for specified file. Option to limit to match by field name.
Average rating: 4.6 (28 votes) Log in to vote
cfLayoutLister( "Contacts"; 1; "Name*"; ""; "")
cfLayoutLister( "Contacts"; 1; "Name*"; "x"; "Layouts where name field exists:")
Layouts where name field exists:
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
List layouts and fields. You may specify file or leave blank for current file. You may specify field name and only layouts containing this field will be returned; together with the list of all fields on that layout. If you enter any value in "onlyLayouts" then the field list is not returned, only layout names. Some degree of "wild card" support is provided. So you could enter "Items::*" and all layouts showing related fields such as Line Items::Qty, Line Items::Price; PO Items::Qty etc will be returned. Requires Quicksort custom function but that part can be easily removed.
Jul 4, 2016
With the custom function 'Quicksort' installed, along with this custom function, when I set a variable as:
cfLayoutLister( ""; 1; ""; ""; "" )
I get nothing back, the variable is blank and I get no error in my script.
Perhaps I am missing something but I am not seeing what the last parameter [result] should be set to. Should my example above not return a list of all layouts, all fields?
I am using FM 15
Bruce, Redmond WA
Jul 4, 2016
|Your expression works fine. But you will need to fix the Quicksort function first.|
Sep 14, 2018
|Would this function be better if all the field names were fully qualified?|
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.