I want to solve is the following: based on some record in the table, I want to make a numbers file. There are two options I can do:
1. Search the records in FM and then with AppleScript make the file in numbers and fill in the fields of the records. Searching in FM is no problem, but with AppleScript I get always the whole table with all the records. My script is in that case:
2. The other way is, do the search Applescript en then sort the record I found. But my AppleScript doesn't do the sort, he gives error -1708.My script is in that case:
Can anyone help me, with either the first or the second problem?
1. Search the records in FM and then with AppleScript make the file in numbers and fill in the fields of the records. Searching in FM is no problem, but with AppleScript I get always the whole table with all the records. My script is in that case:
AppleScript:
tell application "FileMaker Pro Advanced"
tell current table
set aantal to count records
display dialog aantal
repeat with i from 1 to aantal
tell record i
......
end tell
end repeat
end tell
end tell
2. The other way is, do the search Applescript en then sort the record I found. But my AppleScript doesn't do the sort, he gives error -1708.My script is in that case:
AppleScript:
tell application "FileMaker Pro Advanced"
tell current table
show (every record whose cell "Factuurnummer" = "2019-0-266")
set aantal to count records
display dialog aantal
repeat with i from 1 to aantal
tell record i
...
end tell
end repeat
end tell
end tell
Can anyone help me, with either the first or the second problem?