Newbies Robb Kerr Posted June 5, 2003 Newbies Posted June 5, 2003 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
Ugo DI LUCA Posted June 5, 2003 Posted June 5, 2003 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 ?
ernst Posted June 10, 2003 Posted June 10, 2003 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.
paulage77 Posted June 13, 2003 Posted June 13, 2003 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.
Recommended Posts
This topic is 8203 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 accountSign in
Already have an account? Sign in here.
Sign In Now