I am unable to get a Filemaker record by ID using AppleScript
I am scripting FileMaker pro in Applescript - all was going great until I hit a wall. I can get records from any table matching any field against its value EXCEPT for the ID - which is a bit of a deal breaker. I have tried dozens of ways and they all fail - generally with an error -1728.
This is example code:
on getRawDBDRowTest(DB_DEF, _id)
local rowCount, rowID, i, allRaw
try
tell application "FileMaker Pro"
activate
tell database the (dbName of DB_DEF)
tell table the (tableName of DB_DEF)
go to layout the (tableName of DB_DEF)
set rowCount to the count of records
if (rowCount > 0) then
set rec to every record whose cell "taskID" = _id
return rec
else
return {}
end if
end tell
end tell
end tell
on error errTxt number errNum
if errNum is equal to -1728 then
--No results
return {}
else
error "DBUtils/getRawDBDRow
" & errTxt
end if
end try
end getRawDBDRowTest
This is my field definition:
I can confirm that I have valid GUIDS in my data:
I have lost a full working day on what should be a simple thing - any pointers?
MacBook Pro 13″, macOS 10.15