AnsweredAssumed Answered

external AScript targeting a table for new record

Question asked by anode505 on Oct 11, 2009
Latest reply on Oct 11, 2009 by FentonJones

Title

external AScript targeting a table for new record

Post

I'm just starting to play with AS integration with FM.

DB= AS Test

first table = ASTest

Second table = ASTest2

(both tables identical, done via copy)

 

set nme to "Bob"

set num to "23"

tell application "FileMaker Pro Advanced"

  activate

 

  -- This works on current table

 

  create new record at the end

  go to the last record

  set the contents of field "Name" of current record to nme

  set the contents of field "Number" of current record to num

 

-- This doesn't work.   

-- This creates an object not found by FM (AS error)

-- It does create the record, just won't enter data

 

  tell table "ASTest2" of database "AS Test"

    create new record at the end

    go to the last record

    set the contents of field "Name" of current record to nme  -- <--- Fails here

    set the contents of field "Number" of current record to num

  end tell

 

end tell 

Outcomes