tell application "FileMaker Pro.app"
go to document "MyApp"
tell document "MyApp"
go to layout "Invoice"
tell current layout
set my_list to cell "InvoiceID" of (every record whose cell
"Status" is equal to "Open")
end tell
end tell
end tell
Try this:
tell application "FileMaker Pro"
open document "path:to:myapp"
show layout "Invoice"
try
set my_list to cell "InvoiceID" of (every record of table
"Invoices" whose cell "Status" is equal to "Open")
on error
set my_list to {}
end try
end tell
Note that you'll need to insert the correct table name: I've assumed
"Invoices". Also, if there are no records with Status="Open" then
FileMaker will error, so you need to trap for that.