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.


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 1 + 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. SortList ( theList )
  (Sat, Jun 23, 8:45am)
2. HexUUIDToNum_cf (_uuid)
  (Sat, Jun 16, 1:55pm)
3. httpResponseCode ( responseHeaders )
  (Tue, Jun 12, 10:40pm)
4. FindDuplicateCharacters ( string )
  (Fri, Jun 08, 5:01pm)
5. FieldRepetitionLast ( field ; maxRepetition )
  (Wed, Jun 06, 6:05pm)
6. CountModifiedRecords ( NameTimestampField ; StartTimestamp ; EndTimestamp )
  (Mon, May 28, 8:23am)
7. JSONArrayLength ( JSONArrayStr )
  (Fri, May 25, 7:46am)
8. interpolation (y1; y2; y3; x1; x2; x3; x1y1; x2y1; x1y2; x2y2; rnd)
  (Sat, May 19, 3:55am)

RSS Feed of Custom Functions