Page 1 of 1
some scripts do not work on a Mac, FileMaker Pro Develope 6?
Posted:
Thu May 11, 2006 12:27 am
by Guest
Hi to All the Gurus among us!
I wrote a complex loop that when it runs, it takes about 2 minutes for the Mac. It has a script to go to the related record, when it comes back and then when it comes back, the original record is lost and there is no record in the found set!
This problem does not happen on the PC and not always on the Mac (just when I need the data badly).
Any ideas??
Mac G4, iBook, FileMaker Pro 6.x Developer, the database is hosted.
James.
Posted:
Thu May 11, 2006 6:47 am
by John Sindelar
I don't think we can tell just from that description. Want to post the script?
(What I do is print a PDF of the script, the copy the text from the PDF and paste it in here, taking care to enter some line breaks so its readable.)
Posted:
Sun May 14, 2006 5:31 pm
by Guest
Hi John,
Thanks for your answer, not sure how to print a PDF. so the script is here. comments start with #.
# This script is called by a looping script. Sometimes this script generates an error message at the last part of the script. Mac only, sometimes only - not consistent.
Enter Brose Mode []
Set Error Capture [On]
Go to Layout [Refresh window, "record update"]
# This layout contains related fields.
Show All Records
Omit Record
Show Omitted
# To insure that there is only one record in the found set. There is a one to one relationship (some fields moved to another file to make calculations faster)
Go to Field ["relationshipname::textfieldname"]
Go to Portal Row [Last]
#Creates a new related record by setting the temp field to any data.
Set Field ["relationshipname::textfieldname",""Text""]
Go to Related Record [Show,"relationshipname"]
Perform Script [Sub-scripts, External:"relatedfilename.fp5(*)"]
# At this stage, sometimes (not alwasys) there is no related record found. - Mac only, updates the data in the related record
Go to Layout [original layout]
# At this stage, sometimes (not alwasys) the original related recor is lost here.
Thanks again,
James