Re: Doing a FileMaker search from AppleScript
Re: Doing a FileMaker search from AppleScript
- Subject: Re: Doing a FileMaker search from AppleScript
- From: Ralph Richardson via AppleScript-Users <email@hidden>
- Date: Tue, 19 Apr 2022 12:42:35 -0700
Something like:
tell application "FileMaker Pro"
activate
tell database "databasename"
set request1 to create new request
tell request1
set field "FileName" of request1 to "searchstring"
end tell
find
--then loop through found records
end tell
end tell
Ralph
On Tue, Apr 19, 2022 at 12:04 PM Jenni via AppleScript-Users <
email@hidden> wrote:
> I need to find how to do a search in FileMaker from an external
> AppleScript. At present I'm using:
>
> *show* (*the* *first* *record* *of* current table *whose* *cell*
> "Application" *contains* app_name)
> *set* my_pw *to* *get data* *cell* "password" *of* current record
>
> however this only works properly when there's a matching record. If not,
> I get this error:
>
> FileMaker Pro 18 Advanced got an error: Event not handled.
>
> If I wrap it in a try block, it will return the info from the current
> record — even if my search was unsuccessful. I need my_pw to be "" if no
> record was found.
>
> How can I do an actual search externally where I can use Get ( FoundCount
> ), or some other means, to see if a record was actually found?
>
> Thanks,
> Marc
>
>
> BTW, I know that I can do this in FileMaker itself, and then just call the
> script, but I'd like to do it in my AppleScript script.
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden