Filemaker Pro 8 question
Filemaker Pro 8 question
- Subject: Filemaker Pro 8 question
- From: "Mara Jade Skywalker" <email@hidden>
- Date: Mon, 11 Sep 2006 21:24:58 -0600
Hello!
I hope someone can help me. I have a portion of an applescript that's embedded in a Filemaker Pro 8 database as a native applescript. Most of the script runs from the Finder application, but this portion is called from within Filemaker Pro itself. The script has a weird quirk that I can't figure out.
First off, if the script is run by an account with full access, it all works fine. If, however, the script is run by someone with a restricted account, the quoted portion errors out. I thought at first that I might not have the right custom privileges defined, so I double checked them, then I tried running the script from Script Editor, rather than from within Filemaker itself. Even with a restricted account, it worked fine.
Basically, what happens is that the new record gets created, but the window doesn't truly go to the new record, and then when the script tries to access the requested cells of the new record, it can't find that record, and I get an error saying that Filemaker can't find the object.
In previous scripts, I have found similar things happening, where the script is running too fast for Filemaker to switch between records. Even adding pauses into the script doesn't give Filemaker enough "time" to go to the record requested.
Any suggestions are welcome, as I've been banging my head against a wall. The only two solutions I've been able to come up with is to give all employees full access to the database (not going to happen! LOL), or create an external application script, making the Filemaker embedded script a simple "call" script to the external one. That, however, seems to be an inelegant solution.
Here's the portion of the script that errors out. If anyone needs the full complete script, let me know, and I'll send it.
tell application "FileMaker Pro"
activate
tell layout "Data_Entry_Layout" of window 1 of document "McKesson_Archive_Mar2006_v1.fp7"
set new_record to create new record
go to new_record
tell new_record
set current_record_number to cell "New_SKU_Number" as string
set existing_image_path to cell "InCatalog_Image_Path"
end tell
end tell
end tell
A quick note: The restricted privilege accounts all have access to create new records in the layout indicated (as do full access acounts). And neither full access, nor restricted access, accounts can edit the two cells indicated in the browse mode, as they are auto-populating fields. Thus I can't see how the account privilege definitions are causing the errors.
Thanks in advance,
Tina
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden