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

NumRange ( From ; To )

Rate this function:  

  Average rating: 4.0  (46 votes)
  Discuss this Custom Function

Ray Cologon, NightWing Enterprises

Generates a multi-key containing all values between two numbers.

Sample Input:
Numrange ( 14 , 19 )
Sample Output:

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


Matching an integer (number, date, time etc) to a range is now supported in FileMaker via multi-predicate relationhships using the < and > operators. However matching a range to a range (for example, where one would need to establish that either the start OR the stop date OR any date between in one range falls within the other range) may still require that at least one of the ranges be reduced to a quasi-entity in the form of a mult-key value.

For extensive range comparisons, a technique such as Mikhail Edoshin's Smart Ranges may still be applicable, but for more moderate requirements a simpler multi-key which uses recursion to extrapolate the key value set can be used.

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


5 most recent comments | Show all 7 comments

Yepp the small demo works great.
My own implementation however showed only first and last number and I still havent figured out why.

But never mind, now it works - in mysterious ways...

Johan S, Malmö Sweden
January 22, 2012 6:05am

I had the same experience. The demo works fine, but in my own database, I'm having the same experience as Johan (it shows just the first and last number).

Nur Ritter, Hancock, NH
November 03, 2014 7:34am

It might be the function does not reliably work because the ¶ is NOT quoted. But FileMaker doesn't complain when the calculation is closed, which is odd.

Try the following:

GetAsNumber(To) > GetAsNumber(From);
GetAsNumber(From) & "¶" &
NumRange(GetAsNumber(From) + 1; To);

mmaass, Tinseltown
November 25, 2015 8:14am

There is no requirement to include quotes around a single carriage return character since the release of FileMaker 7 in March 2004.

Meanwhile, if implemented as set out in the original post here, the function works as described and produces a sequential list of numbers between the From and To values. It has been tested in all versions of FileMaker between version 7 and 14 inclusively and works correctly in all of them. We have also implemented it in dozens of solutions without encountering any problems.

However if regional settings for the file and system don't match, a number entered with "unexpected" thousand separators may not be interpreted appropriately. This can result in a data type-casting problem if values are supplied as text strings. For example the values 1411 and 2411, if passed as the "from" and "to" parameters with "." included as thousand separators (as in some EU countries) - i.e. as 1.411 and 2.411 - may be interpreted by the calc engine as decimal fractions, leading to the issue described by Johan.

In this case the solution would be to supply explicitly numeric values (i.e. ensuring they aren't passed to the function with thousand separators included).


Ray Cologon, Melbourne
November 25, 2015 1:13pm

you don't have to make it long . just write

NumRange (From;to)

Mark Avila, Manila, Philippines
May 26, 2016 11:43pm

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

RSS Feed of Custom Functions