AnsweredAssumed Answered

Basic applescript problem

Question asked by csgnyc on Feb 27, 2017
Latest reply on Feb 28, 2017 by dsvail

Not new to applescript, but new to scripting Filemaker.  Having a basic problem.  If I script

 

tell application "FileMaker Pro Advanced"

  set thedatabase to database "XYZ"

  set cell 3 of record 2 of thedatabase to "1981"

end tell

 

then everything's fine -- the third item of record 2 becomes "1981"

 

However, if I script

 

tell application "FileMaker Pro Advanced"

  set thedatabase to database "XYZ"

  set therecord to record 2 of thedatabase

  set cell 3 of therecord to "1981"

end tell

 

I get a "Can’t set «class ccel» 3 of {the current cells of record 2}

 

Any idea what I'm doing wrong?

 

Ideally I want to write a script that enters data into the fields of the current record.  Using "current record" doesn't seem to help.

 

Thoughts would be appreciated.

Outcomes