Jump to content
Sign in to follow this  
Robb Kerr

Find in FMPro6 of matching cell contents

Recommended Posts

I'm trying to create a script that finds all records where the contents of a particular field matches exactly the contents of another. Both fields are Date fields. What I've got so far is...

tell application "FileMaker Pro"


go to database "CenterstoneBusinessCards.fp5"

go to layout "OrderStatusReport"

show every record of database "CenterstoneBusinessCards.fp5"

show (every record of database "CenterstoneBusinessCards.fp5" where cell "Date.Last" is equal to cell "Date.Order")

show layout "OrderStatusReport"

end tell

Whenever I run the script I get an error - "Unable to coerce the data to the desired type."

Can anyone tell me what's up and where I've screwed up?



Share this post

Link to post
Share on other sites

Well, no need for Applescript here.

c_Match = Case(field A = Field B; 1,0).

Then search for all 1


set a global field to 1

a relationship global::c_Match

and a script Go to related records (relationship -show only)

Am I missing something here ?

Share this post

Link to post
Share on other sites

Hello Guys,

Ugo is totally right that you do not need Applescript to accomplish this task.

But in general, if you want to use Applescript, it is smart to do the debugging in Script editor, because then you can at least see which is the offending line.



Share this post

Link to post
Share on other sites

if you are trying to automate the execution of the aboved mentioned script you can use applescript to open FM and there is a simple "do script" command in applescript. Easier to let FM do the brunt of the work. I do lots of Applescripting and automation with FM, and have found that it's easiest to do as much as possible in FM and then simply launch with a "do script" from Applescript.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.