dbTalk Databases Forums  

Applescript for related records

comp.databases.filemaker comp.databases.filemaker


Discuss Applescript for related records in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bill Steele
 
Posts: n/a

Default Applescript for related records - 03-31-2011 , 03:49 PM






I have a database in which each record represents a story in a magazine.
A portal links to a photo database to show photos that go with the story.

To extract data I have an Applescript like so (oversimplified to one
field and no repeats):

tell application "FileMaker Pro"

tell database "Stories"
tell current record
set storyTitle to cell "title"
do script "RelatedRecords" --Filemaker script: Go to related
record; show only related records
--
end tell
end tell

tell database "Photos"
set oneCaption to cell "caption" of current record
end tell

end tell

This worked find with Filemaker 9 on Leopard. Now we've upgraded to
Filemaker 11 and Snow Leopard.

And now the above errors on the first attempt to read the related
records with "Data is being accessed by another user, script or
transaction."

Worse, *sometimes* it works. For a while. I can sometimes jump start it
by scrolling to an earlier record in the database and then back, or by
quitting Applescript Editor and then starting it again. The actual
script has a lot of looping through records, and when it does work it's
good for about 4 or 5 photos and then it dies. I thought "memory issue,"
but sometimes it just won't run at all, even from a fresh start.

Suggestions?

Reply With Quote
  #2  
Old   
Howard Schlossberg
 
Posts: n/a

Default Re: Applescript for related records - 03-31-2011 , 07:38 PM






On 3/31/2011 1:49 PM, Bill Steele wrote:

Quote:
Suggestions?

Use a FileMaker script rather than an APpleScript? Is there a
particular reason you are trying to do this with AppleScript?

Reply With Quote
  #3  
Old   
Bill Steele
 
Posts: n/a

Default Re: Applescript for related records - 04-01-2011 , 12:18 PM



In article <in36qb$e4l$1 (AT) news (DOT) motzarella.org>,
Howard Schlossberg <howard (AT) nospam (DOT) fmprosolutions.com> wrote:

Quote:
On 3/31/2011 1:49 PM, Bill Steele wrote:

Suggestions?


Use a FileMaker script rather than an APpleScript? Is there a
particular reason you are trying to do this with AppleScript?
1. It has to do some image processing.
2. As previously noted, it used to work perfectly.

However, that might be a fallback if I can't fix this: read the info
with a Filemaker script, then pass it to Applescript for processing.
Except that there's no good way to pass variables from Filemaker to
Applescript. (I know, global fields. Ten in a row?)

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.