CustomList ( Start ; End ; Function )
Rate this function: Average rating: 4.3 (146 votes) Discuss this Custom Function
Agnes Barouh, Tic Tac
http://www.tictac.fr/CoinFileMaker/Page.html
Update for FileMakerServer. Update for FileMakerGo. Update, new version  customized lists  not recursive  Unlimited
Sample Input:
CustomList ( 3 ; 4 ; "GetValue ( MyList ; [n] )" )

CustomList ( 25000; 85000; "[n] & "". "" & Get(CurrentDate ) + [n]")

CustomList ( 2; 5 ; "GetNthRecord ( FieldRecord ; [n])") 

Sample Output:
returns "Not¶Recursive" if MyList is
"CustomList¶Is¶Not¶Recursive¶But¶Now¶Unlimited"

25000. 12/12/2076
25001. 13/12/2076
25002. 14/12/2076
25003. 15/12/2076[...]

FieldRecord2
FieldRecord3
FieldRecord4
FieldRecord5 

Description:
// Note : 10/16/2015
Carrefull : If you rename CustomList, you must also rename it in code / line "iter"
iter = Let ( $CLExeCount = $CLExeCount + 1 ; $CLExeCount & PatternCount ( Function ; "CustomList" ) + 1 ) ;
becomes
iter = Let ( $CLExeCount = $CLExeCount + 1 ; $CLExeCount & PatternCount ( Function ; "list.custom" ) + 1 ) ;
for example if your rename in list.function
is just a security far unic iter when you used many CustomList in CustomList
( is not really an real incidence but is better, it is a protection )
***
Edit November6 2012 :
v4.8 > Adapte the calc for FileMaker IWP
Carreful : Limited
with FilemakerServer = End  Start ≤ 250000
***
Edit November10 2011 :
v4.7 > Adapte the calc for FileMakerServeur
Carreful : Limited
with FilemakerServer = End  Start ≤ 120000
***
Edit August24 2010 :
v4.6 > Adapte the calc for FileMakerGo
Carreful : Limited
with Filemaker = End  Start ≤ 500000
with FilemakerGo = End  Start ≤ 150000

Edit July24 2008 :
v4.5 > Replace "Num" by "CLNum"
[please, do not used "CLNum" or $CLn in your calculation with Let() ]

v.4.4  5 July 2008  Change Iter  Change if Result is Empty  And Ugo sign the Notice
v.4.3  3 July 2008  Change FunctionR > handles litteral carriage returns

is an "Update", new version of CustomList () first version : [http://www.briandunning.com/cf/747]

End or Start are no longer limited,
only the interval between End  Start is limited : ( End  Start ) ≤ 500,000
you can now target from the 50,000th to 100,000th records or more

New calculation, Faster version.

Bonus : For Developper ease, CustomList includes a debugging mode : find the "/*****DEBUGGING MODE*****/" tag in the calculation
if Debug = 1, return Error (formula or result is not correct), else, return "?"

it is not a recursive function
For data processing, customized lists.

For all native functions with a number
Left(), Middle(), GetValue(), GetNthRecord(), GetLayoutObjectAttribute () ...
or any range of numbers, dates, times and timestamps ...
CustomList can be a base for many other customs functions
 *
CustomList ( 1 ; 1000 ; "Thanks Ugo and Fabrice !" )
 *
 more examples
The Argument "Function" can be :
Examples : with [n] to define the numeric list
 "GetNthRecord ( Field ; [n] )"
 """Name =>"" & GetNthRecord ( FieldName ; [n] ) & "" FirstName =>"" & GetNthRecord ( FirstFieldName ; [n] )""
 "[n] & ""."" & MiddleValues ( Field ; [n] ; 1 )"
 "GetAsDate ( Date ) + [n]"
 "GetLayoutObjectAttribute ( ""ObjectName"" ; ""Content"" ; 1 ; [n] )"
 "Let ( [ Value = GetValue ( MyList ; [n] ) ] ; Case ( PatternCount ( Value ; "X" ) ; Value ))"
 "Let ([ $$Var[[n]] = GetNthRecord ( Field ; [n] ) ] ; """" )" // To charge N variable
 "GetRepetition ( RepetitingField ; [n] )" [...]
All native functions including Let (), any Custom Function, including CustomList() itself can be used in a formula into the "Function" argument
 Under the hood :
Basically, CustomList() does two things :
1/ Transform your formula in litteral chain :
CustomList ( 1; 4; "GetNthRecord ( Field ; [n])")
becomes
"Let ([ CLNum = 1 ] ; GetNthRecord ( Field ; CLNum )) & ¶ &
Let ([ CLNum = 2 ] ; GetNthRecord ( Field ; CLNum )) & ¶ &
Let ([ CLNum = 3 ] ; GetNthRecord ( Field ; CLNum )) & ¶ &
Let ([ CLNum = 4 ] ; GetNthRecord ( Field ; CLNum ))"
2/ Evaluates this chain.
Agnès Barouh
Thanks to ® Ugo Di Luca
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:5 most recent comments  Show all 9 comments Make a comment about this Custom Function (please try to keep it brief & to the point). Anyone can post:

Newest Custom Functions:
1. 
AddSortOrder ( values ; padWidth ; delimiter ; currentValue ) 

(Wed, Aug 16, 10:37am) 
2. 
AddAddHiddenSortOrder ( values ; currentValue ) 

(Wed, Aug 16, 10:31am) 
3. 
String_to_Number_in_Scientific_Notation ( text ) 

(Tue, Aug 15, 9:20am) 
4. 
Quartic_Solver ( a, b, c , d, e, which_x ) 

(Sun, Aug 13, 1:05pm) 
5. 
SQLRefSimple ( FldRef ; Option1TO2Fld3Both ) 

(Fri, Aug 11, 3:19pm) 
6. 
BinaryStringXOR ( a ; b ) 

(Mon, Aug 07, 1:46pm) 
7. 
VarListCreatorPro ( VarType, VarName, VarValue, Mode) 

(Mon, Aug 07, 1:05pm) 
8. 
CustomQuickSort ( values ; valueFunction ; direction ) 

(Mon, Aug 07, 3:58am) 


The function uses the iterator n: = n + 1 to calculate the term from one line to the next. I have some applications where I would like to specify a different iterator function. For example, n: = 2 * n + 1 or n: = n ^ 2 or more generally: n: = f (n).
My question: Is it a difficult problem to provide a version of Custom List, which you can specify its own iterator function?
Erich, Rostock/Germany
September 04, 2015 2:40am