Subject: | |
From: | |
Reply To: | |
Date: | Tue, 14 Oct 2008 11:04:17 -0600 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
So I've discovered that show every record whose cell....doesn't work
all that well in the new FMP9a AppleScripting Events.
They've got something called "Find" and the syntax is as follows:
tell application "FileMaker Pro Advanced"
try
delete every request
end try
try
create request
set cell cellName of request 1 to cellData
find
on error errMsg number errNum
set theError to errMsg
set recID to 0
end try
So what do you do when you want to search on multiple criteria? As in
two fields with two datum?
I tried THIS...
tell application "FileMaker Pro Advanced"
try
delete every request
end try
-- find the record we want to update
set xCount to 1
repeat until dataList is equal to {}
set thisData to item 1 of dataList
set dataList to rest of dataList
set cellName to item 1 of thisData
set cellData to item 2 of thisData
try
create request
set cell cellName of request xCount to cellData
find
on error errMsg number errNum
set theError to errMsg
set recID to 0
end try
set xCount to (xCount + 1)
end repeat
set recID to cell "RecordID" of current record
set recCount to (count of records in current table)
end tell
It doesn't work.
Instead of finding the one record I'm looking to find, it finds
multiple records with the data from the last request only.
If I try a variation where the 'find' is called after all the
criteria have been loaded, e.g.,
if dataList is equal to {} then
find
end if
I get the same results, whatever was the last request criteria entered.
What's the new approach on how to deal with multiple search requests?
Regards,
Chuck
|
|
|