AnsweredAssumed Answered

Create record from AppleScript. FMP Advanced

Question asked by kbb on Oct 10, 2008
Latest reply on Oct 12, 2008 by kbb

Title

Create record from AppleScript. FMP Advanced

Post

Attempting to add iTunes fields, one at a time to a FMP custom database.  Have been unable to set the correct cell.  I have everything else working great it is only when I attempt to populate the FMP fields that i am failing.  If you can point me in the right direction, it is greatly appreciated.  Below is a log created upon running the following script segment (all of the end statements are there as well as an else that produces an error dialog - these are not executed):

 

tell application "FileMaker Pro Advanced"

set thisNewVolRecord to (get a reference to (create new record at table "Music Library Volumes" of database "music library")) 

repeat with fc from 1 to count of items of volFieldIdList

if item fc of myVolValues is not equal to "END" then

if item fc of myVolValues is not equal to "x" then

set cell of field (item fc of volFieldIdList) of thisNewVolRecord to item fc of myVolValues

set logVolsWritten to logVolsWritten + 1

endif

 

volFieldIdList contains every field ID in the table and contains 63 entries.

 

myVolValues contains each field from iTunes that I wish to save.  This list is structured to exactly correspond with the fields of the FMP music library.

 

 

Following is a listing of the log:

 

tell application "FileMaker Pro Advanced"

create new record at table "Music Library Volumes" of database "music library"

record id 3.6777E+4 of table "Music Library Volumes" of database "Music Library.fp7"

get current cell

cell id {3.5048E+4, 73.0} of window "Music Library"

get cell ID {3.5048E+4, 73.0} of window "Music Library"

"FB0099"

(*FB0099*)

set cell of field 3.0 of record ID 3.6777E+4 of table "Music Library Volumes" of database "Music Library.fp7" to "Best Of"

"FileMaker Pro Advanced got an error: Object not found."

 

 

Outcomes