Software Venture Consulting

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

Free Web Tools
Free FileMaker Tools

Personal Pages

Shopping Cart
Shopping Cart


Free Newsletter


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

GetRecordNumber ( _field ; _value )

Rate this function:  

  Average rating: 3.9  (19 votes)
  Discuss this Custom Function

Gary Czychi, GC Consulting

Given a field value, returns its current Record Number within the current Found Set

Sample Input:
GetRecordNumber ( author::name ; "Douglas Adams" )
Sample Output:

 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


Returns the first line number that contains _value, of a list of _field values of all records in the current found set
Returns NULL ("") when _value is not in the list
Returns the correct line number , no matter whether the found set is sorted or not !
=> which is IDEAL for Go To Record/Request/… script step

If it doesn't work, you probably not calling it with a field reference, but with a field value:
_field is a field reference, not a value:
If the field name is stored inside a field, use Evaluate ( ) => GetRecordNumber ( Evaluate ( g::tmpT ) ; g::tmpN )

Based on the ListValues ( Field ) recursive function from Koji Takeuchi:
Given the list of Koji Takeuchi, added number strings at the beginning of each line, followed by a tab character and the line value
At the end, searches for a tab, the _value and reads its line number, then returns the line number

GetRecordNumber ( author::name ; "Douglas Adams" )
=> Returns the number 42 (if the record with "Douglas Adams" is the 42nd record in the current found set).

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

This is my Custom Function and I want to edit it


Undefined Null is used in this function.
I tried replacing it with "", but not get result.

unix, Japan
March 29, 2016 6:38pm


sorry about the «Null» function, you're right. I already changed it to "", which is the exact same thing, as you have done. I use the Null function because it makes for much better reading and understanding of code afterwards.

If it still doesn't work, you are probably not calling the function with a field reference, but with a field value (whereas the _value is a value):
_field is a field reference (not a value):
If the field name, for example «author::name» is stored inside of a field, use Evaluate ( ) => GetRecordNumber ( Evaluate ( g::tmpT ) ; g::tmpN )

This will probably do it.

Thanks for your question. Now, it should be clearer.


Gary, DÜsseldorf, Germany
March 29, 2016 7:58pm

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

Your Name:
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 2 + 2 =
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. PreviousMonthEndDate ( myDate )
  (Wed, Mar 07, 3:35am)
2. PreviousMonthName (myDate)
  (Wed, Mar 07, 3:33am)
3. FmTableFields ( tableName ; fieldsInclude ; fieldsExclude ; classExclude ; typeExclude ; prefixExclude )
  (Fri, Mar 02, 6:32am)
4. sql.getTable ( fullyQualifiedFieldObject )
  (Thu, Feb 22, 8:36am)
5. sql.getField ( fullyQualifiedFieldObject )
  (Thu, Feb 22, 8:34am)
6. FilterOut ( ListA ; ListB )
  (Wed, Feb 21, 6:11pm)
7. Char0 ( )
  (Sun, Feb 18, 2:35am)
8. CreateVCardFile ( FirstName ; LastName ; CompanyName ; Phone ; Email ; WEB ; hAddress1 ; hAddress2 ; hZip ; hCity ; hCountry ; wAddress1 ; wAddress2 ; wZip ; wCity%2
  (Sun, Feb 18, 1:50am)

RSS Feed of Custom Functions