Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7832 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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"

activate

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?

Thanx,

Robb

Posted

Well, no need for Applescript here.

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

Then search for all 1

or

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 ?

Posted

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.

Regards,

Ernst.

Posted

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.

This topic is 7832 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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