I am using FMP Advanced 15.0.3 with Mac OX 10.11.6 and can't seem to get/set field values of a set of found records, or indeed reference the fields properly. I have a three table database and one table,called Image_Files, has a container field manually set to store an image externally by reference. I can access the field "Image" in every record with the following script but I need to access a found set and not every record in the table:
In the above, A is a list of all records. I need to work with only the found set. I tried referencing by layout and window and also by database rather than document. The above is the only way I could get at field/cell contents. How does one work with the found set only?
Code:
--use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
tell application "FileMaker Pro Advanced"
tell document 1
set A to field "Image" of table "Image_Files"
count of A --results in count of ALL records
set theFile to item 1 of A
tell application "Finder"
name of file theFile --correct value
end tell
end tell
end tell
In the above, A is a list of all records. I need to work with only the found set. I tried referencing by layout and window and also by database rather than document. The above is the only way I could get at field/cell contents. How does one work with the found set only?