Brian Dunning's FileMaker Custom Functions

IterateThrough ( listOrArrayOrObject ; thisVariableName ; iterationVariableName )

Iterates through a list, array or object

  Be the first to rate this function Log in to vote

Paul   Paul - Show more from this author
Peak 14 LLC

Share on Facebook Share on Twitter

  Sample input:
IterateThrough ( $myList ; ""; "" )
  Sample output:

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

This is meant to make looping through variables easier and more concise. This script is meant to be used in the "Exit Loop If" script step and will handle setting 2 local variables:

You value: Default is $thisValue and is the current value of what you are looping through.
Your iteration variable: Default is "$i" and this is used as what number you are currently on through the list. Also known as the index. Starts at 1.

Set Variable [ $list; "a¶b" ]
Exit Loop If [ IterateThrough ( $list; ""; "" ) ]
Show Custom Dialog [ $thisValue ]
End Loop

The above code will display 2 dialog windows. The first one will be show "a" and the second will be "b".



Log in to post comments.


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

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 19 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: