FileMaker Script Tip: Create Records from a List of Values

Modified on September 13, 2014.

Loops make it easy to create records from a list of values

FileMaker Script Steps

Note: the variable $itemCount counts all the paragraph separated values in the variable $valueList; the variable $valueList contains your list of values from a global field, List of summary calculation, etc; the variable $i tells us which paragraph separated value in the $valueList we’re working with – the first, second, third, etc.

Set Variable [$i; Value:0]
Set Variable [$itemCount; Value: ValueCount($valueList)]
Exit Loop If [Let ( $i = $i + 1 ; $i > $itemCount )]
Set Variable [$value; Value:GetValue($valueList ; $i)]
# Do other steps here – like create new record, set fields with values from $i and $value
New Record/Request
Set Field[Data:Counter; $i]
Set Field[Data:Value; $value]
End Loop