HI,
how to use “and” operator in filemaker pro using apple script?
I have given the following code:
show (every record whose cell “SNo” is sno and cell “ENo” is eno)
but Event cannot be handled error is occuring.
what should i do?
Can anyone tell me how to proceed?
Thanks
blend3
May 17, 2007, 3:05pm
#2
Hi there,
not sure if this will do what you want but if I want to search Filemaker with more than 1 search criteria I do this:
tell application "FileMaker Pro"
tell database "yourDatabaseName"
set therequest to create new request
set cell "SNo" of request 1 to "sno"
set cell "ENo" of request 1 to "eno"
find
end tell
end tell
Hi,
try it with parentheses
show (every record whose (cell "SNo" is sno and cell "ENo" is eno))
blend3’s approach looks about what I’m used to for “and” on two separate fields in the same record.
If you need to do an “and” on the same field, you have to use AppleScript to create multiple find requests the same way a user would have to manually.
bevos
May 18, 2007, 3:13am
#5
This works, filemakers a little strange on it object model use
tell application "FileMaker Pro"
show database "surf"
go to layout "images"
show (every record whose cell "SID" = 12 and cell "UID" = 13)
end tell
of course you have to have an open database called ‘surf’, a layout call ‘images’ and fields SID and UID
have fun
It’s also good practice to wrap all FM queries in a “try” statement
-N