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  (47 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 5 + 4 =
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. decFromHex ( hexValue )
  (Mon, Oct 16, 12:34pm)
2. MonthYearList ( startmonth ; startyear ; numbermonth ; short )
  (Mon, Oct 16, 3:38am)
3. ErrorDescription ( errorNumber )
  (Wed, Sep 27, 2:51am)
4. decodeEntities (text)
  (Wed, Sep 27, 1:22am)
5. HexidecimalToNumber ( HexidecimalValue ; counter )
  (Mon, Sep 25, 12:39pm)
6. FixedFieldConverter ( Fieldname ; f1 ; f2 ; f3 ; f4 ; f5 ; f6 ; f7 ; f8 ; f9 ; f10 ; f11 ; f12 ; f13 ; f14 ; f15 ; f16 ; f17 ; f18 ; f1
  (Fri, Sep 15, 12:34pm)
7. ShannonEntropy ( text )
  (Thu, Sep 07, 5:59am)
8. LetterCount ( text ; summary )
  (Thu, Sep 07, 5:53am)

RSS Feed of Custom Functions