AnsweredAssumed Answered

In mac lion, Filemaker Pro 11.0v4 doesn't evaluate (recalculate) script results between cycles in a...

Question asked by AdalgeirArason on Aug 17, 2012
Latest reply on Aug 17, 2012 by AdalgeirArason

Summary

In mac lion, Filemaker Pro 11.0v4 doesn't evaluate (recalculate) script results between cycles in a loop

Product

FileMaker Pro

Version

11

Operating system version

11.0v4 - run on Mac mini (2.3 GHz Intel Core i5) with Mac OS X 10.7.4

Description of the issue

A loop is supposed to stepwise add +1 to a field in the current record and look for an exit signal (by relookup, to see if a unique combination of two fields has been found).

It doesn't evaluate the results before starting the next cycle, so the exit signal doesn't work. The loop can only be stopped by cmd-. (command-dot).

The script works perfectly in Filemaker 8 in PC and it always did so in my older mac, before upgrading to version 11 and lion.

Steps to reproduce the problem

See an uploaded demonstration file for this problem at https://sites.google.com/site/allamappa/home/filemakerquery

The file's name is ScriptProblem.fp7

The simplest way is to open that file and see (at least in fm 11 on the mac lion platform) how cmd-1 get's stuck in a loop, increasing a number without recognising the exit signal. The only way to stop the script is to use cmd-.

The 'Refresh Window" part of the loop is to make it easier to see on the screen what's happening to the field while the loop goes on.

This is how the script looks:

Show All Records
Go to Record/Request/Page
[ First ]
Loop
Copy [ ScriptProblem::line ]
[ Select ]
Enter Find Mode [ ]
Paste [ ScriptProblem::line ]
[ Select ]
Perform Find [ ]
Set Field [ ScriptProblem::number; 1 ]
Relookup Field Contents [ ScriptProblem::IDnumber ] [ No dialog ]
Loop
Exit Loop If [ ScriptProblem::IDnumber_occurred_before = "" ] Set Field [ ScriptProblem::number; ScriptProblem::number + 1 ]
Relookup Field Contents [ ScriptProblem::IDnumber ] [ No dialog ]
Refresh Window
End Loop
Show All Records
Go to Record/Request/Page
[ Next; Exit after last ]
End Loop
Show All Records
Go to Record/Request/Page
[ First ]

Expected result

Records in a data file will be assigned a reference number, so that any records which share an identical ID will get a unique combination of the ID and the reference number.

I.e. something like this (ID being a text field, the other one a number field):

ID - ref#
A - 1
A - 2
E - 1
A - 3
E - 2
H - 1
K - 1
A - 4
K - 2
etc.

Actual result

ID - ref#
A - 1
A - ->∞ (running until forced to stop)
E
A
E
etc.

Exact text of any error message(s) that appear

No error message.
As said above, runs fine on other platforms / older fm-versions.

Workaround

I can only move my data files to a different platform while running the script, and back to the mac lion after the script results have been incorporated

Outcomes