AnsweredAssumed Answered

Set Field Repetition calculation is evaluated multiple times

Question asked by nickorr on Aug 18, 2011
Latest reply on Oct 11, 2011 by TSGal


Set Field Repetition calculation is evaluated multiple times


FileMaker Pro



Operating system version

Mac OS 10.7.1

Description of the issue

When you are using a calculation in the repetition area of a Set Field script step, the calculation is evaluated more than once.

Steps to reproduce the problem

Create a new file with one field with some repetitions.

Create a script with a Set Field step, setting the field created above.

Put the following calculation into the "Repetition:" calculation box : 

Let ( $$var = $$var & "1" ; $$var )

Set a value for the result as well. Perform the script and check the value of $$var after the script runs.

Expected result

$$var should be "1".  The calculation should be evaluated once and it should only have a single character in it for each time the script is run.

Actual result

In my sample file with 10 repetitions I had the value "111".  But I've seen the values repeat in a real world example with hundreds of values.

The big issue with this is if it's a complex calc it might be causing large slowdowns to evaluate this calc many times.

Exact text of any error message(s) that appear


Configuration information



In the specific case I've got, I can set the variable in the step beforehand.  But in some cases this might not be applicable.

I have a sample file as well if required.