FileMaker pro and apple script

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

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.

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