NameFromID ( _ID ; _Type ; _File )
Gets names from static FileMaker IDs for layouts, scripts, fields, tables, valuelists
Average rating: 4.4 (33 votes) Log in to vote
ThomasSeidler - Show more from this author
The Good Book Company Ltd http://www.thegoodbook.co.uk |
assumes you ran sister function and stored the result:
IDFromName ( "Account: Data Entry" ; "Layout" ; "" )
432
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Obvious thanks to Ray Cologon and bigging up the FileMaker 9 bible. Very heavy book and ideas. Good stuff. Thank you! I didn't want separate functions for Layouts, Scripts, Tables etc - one can do them all.
This function is kind of pointless without its twin sister -
NameFromID...
The big advantage of using FileMaker's internal IDs for layouts, fields and scripts is that the number *never* changes, you may change the layout name, but if you are internally referencing by the ID, you're fine, you can easily nick the current name using this function.
So you may have changed the layout/field order, but it's still got the same ID.
Any bugs tell me and i'll fix, but i've been using this for the last few months particularly with layouts.
Comments
Lorne Walton, Maple Ridge, BC, Canada May 24, 2009 |
||
In practical terms, how is this useful? Isn't it true that any reference to (e.g.) a layout name is coded by FileMaker a in terms of its ID already? So a change of layout name merely changes the visible layer (of a script or calc) and all is taken care of, right? Why do we want to know the ID? |
||
Thomas Seidler, London Dec 7, 2010 |
||
http://fmforums.com/forum/index.php/topic/72951-go-to-layout-based-on-id/ For instance. If you ever use GoToLayout By calculation and send IDs instead of names (as names can change), then you'll need a conversion method as Layout ID ≠Layout Number. Ray Cologon (who is a genius) comments very sensibly on this. Likewise scripts, script trigger custom functions generally require name useage, this name may change, the ID will not, so you need to store the Script ID, and at call point convert the ID into the name using this function. |
||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.