I'm having a problem entering a value into a FM7 request from applescript. The script I have, basically, is:
on run
set myfilename to "Testname.mov"
tell application "FileMaker Pro 7.0"
tell database "EPICPhotographs"
show every request
delete every request
set myrequest to create new request
show myrequest
set cell "filename" of myrequest to ("==" & myfilename) as string
find
try
return cell "header" of current cell
on error
return ""
end try
end tell
end tell
end run
the cell "filename" is a calculated field in the database. when I run this script, I get:
"FileMaker Pro 7.0 got an error: Write access denied."
when I run:
return protection of cell "FileName" of myrequest
I get "formulas protected", and when I run:
return access of cell "FileName" of myrequest
I get "read/write/delete".
This is the method of searching I've used in the last n versions of FMP, and it's always worked, until now. how can I make my request modifiable so I can input data into this field?
Alternately, I was trying to use :
show (records whose cell "FileName" is myfilename)
but I don't know how to detect a failed search from Applescript/AppleEvents in this case.
Any help would be greatly appreciated!
Craig