Software Venture Consulting

FileMaker Pro downloads & Resources
FileMaker Custom Functions
FileMaker Web Viewer Examples
FileMaker Pro & Lasso Consulting
Training
FileMaker Books
FileMaker Articles
FileMaker Error Reference

Free Web Tools
Free FileMaker Tools

Personal Pages
Videos
Adventures
Links

Shopping Cart
Shopping Cart

Search:

Free Newsletter
Signup


Contact


Privacy Policy



FileMaker is a registered trademark of FileMaker, Inc. in the U.S. and other countries.

 

 FileMaker Pro Custom Functions

List  |  Show Random  |  Upload  |  Add This to Your Site

FM_Name_ID ( _Name_ID ; _TLFSV ; _fileName ; _layoutName )

Rate this function:  

RatingRatingRatingRatingRating
  Average rating: 4.2  (49 votes)
  Discuss this Custom Function

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

Returns FileMaker item Name or ID, given the other

Sample Input:
FM_Name_ID ( "MyLayout" ; "L" ; "" ; "" )

FM_Name_ID ( 112 ; "L" ; "" ; "" )
Sample Output:
112

"MyLayout"


 Then copy & paste into FileMaker Advanced's Edit Custom Function window.

Click here to copy To Clip Manager if you have myFMbutler's Clip Manager installed

Description:

This function avoids hardcoding names (hardcoding IDs is much less trouble)
Give a filemaker element (field, layout, table or value list) name, and get its ID. Give it the ID, get the name.

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

This is my Custom Function and I want to edit it

Discuss:

Correction: There is a missing ampersand in the last line of code, between the paragraph character and _item (¶ _item )

Daniel A. Shockley, New York, NY
November 16, 2010 8:21am

With a few changes, this can handle fully-qualified field names (i.e. TableName::FieldName, like you get from GetFieldName). Also, it can be used to stored a (base-)TableID::FieldID to get a field name (without specifying a layout/table-name). Note also the ampersand error in the function as listed here.

MODS:

After the line:
; _t = Case ( _t = "T" ; "Table" ; _t = "L" ; "Layout" ; _t = "F" ; "Field" ; _t = "S" ; "Script" ; _t = "V" ; "ValueList" )

ADD:
; _layoutName = If( _t = "Field" and _layoutName = GetAsNumber( _layoutName ); FM_Name_ID( _layoutName; "T"; ""; "" ); _layoutName ) // allow TableID::FieldID parameter


After the line:
; _p = Case ( _t = "Field" and PatternCount ( _p ; "::" ) ; Replace ( _p ; 1 ; Position ( _p ; "::" ; 1 ; 1 ) + 1 ; "" ) ; _p ) // for fields, do not take TO

ADD:
; _p = Case ( _t = "Table" and PatternCount ( _p ; "::" ) ; Left ( _p ; Position ( _p ; "::" ; 1 ; 1 ) - 1 ) ; _p ) // for tables, do not take the field-name part, if there is one


Here are the revision comments:

v.1.5.1m2 (modification suggestion), Dec 2010 - suggestion by Daniel A. Shockley
Can now get the field name from a fully-qualified field ID ("tableID::fieldID" - e.g. "20384::43" ) - use the BASE table in the parameter.

v.1.5.1m1 (modification suggestion), Nov 2010 - suggestion by Daniel A. Shockley
Added ability to get the ID for a Table Occurrence from a fully-qualified field name ("myTable::myField") - use the BASE table in the

Daniel A. Shockley, New York, NY
January 27, 2011 10:35am

Hi, thanks for the posts.
Actually, these features are already there :
http://fmfunctions.com/fid/82

Sorry, sometimes hard to update everywhere :)

Fabrice Nordmann, Brussels
January 27, 2011 11:15am

Make a comment about this Custom Function (please try to keep it brief & to the point). Anyone can post:

Your Name:
City/Location:
Comment:
characters left. If you paste in more than 1500 characters, it will be truncated. Discuss the function - advertisements and other useless posts will be deleted.
Answer 6 + 3 =
Search for Custom Functions:

Custom Functions Widget
Download the Custom Function Dashboard Widget for OS X
Keep all the latest Custom Functions right at your fingertips!

Newest Custom Functions:

1. ProperAllWords ( text )
  (Thu, Dec 14, 5:19pm)
2. MatchExist ( SourceTable.Field ; DestTable.Field ; ReturnField )
  (Thu, Dec 14, 1:07pm)
3. BVR_Format ( bvr )
  (Wed, Dec 13, 5:32pm)
4. NumberToHexadecimal(NumberValue)
  (Fri, Dec 08, 8:54am)
5. Get_BaseTable
  (Thu, Dec 07, 4:27pm)
6. JSONCreateVarsFromKeys ( json ; namespace )
  (Wed, Dec 06, 8:21pm)
7. GetTableNzme ( field )
  (Tue, Dec 05, 9:16pm)
8. TimeFormatAsText ( theTime )
  (Mon, Nov 13, 1:59pm)

RSS Feed of Custom Functions