June 5, 200322 yr Newbies 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
June 5, 200322 yr 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 ?
June 10, 200322 yr 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.
June 13, 200322 yr 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.
Create an account or sign in to comment