Create new form record using default entries

Hello,

I would like to write a script in order I can automatically create a new row in a form using default entries. Something like:

create record with {name:"myname", type:form} in create location thisPath
set cell at row 1 column 2 to this_message

I tried the code above which does work when the sheet is selected and open, but not without it.
Thanks for your help. Christophe.

Try something likeā€¦


set theLocation to create location thisPath
set theCells to {"field 1","field 2","field 3"}
set theName to "new record"
create record with {name:theName, type:form, cells:theCells } in theLocation

Yeees, Thanks a lot ! Christophe.