Applescripting filemaker pro - referencing found set

Discussion in 'Mac Programming' started by macmesser, Mar 11, 2017.

  1. macmesser macrumors 6502a

    Joined:
    Aug 13, 2012
    Location:
    Long Island, NY USA
    #1
    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:

    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?
     
  2. mpainesyd macrumors regular

    mpainesyd

    Joined:
    Nov 29, 2008
    Location:
    Sydney, Australia
    #2
  3. macmesser thread starter macrumors 6502a

    Joined:
    Aug 13, 2012
    Location:
    Long Island, NY USA
    #3
    Will do. Thanks for reply.
     

Share This Page