2022.2

Table Of Contents
Note: DatesmustbepassedasaDateobjecttoallowthemtobeextractedintoaDatefield.See
DateintheMozillahelpfiles.
Passinganimproperdatatypetriggersanerror.Forinstancethefollowingobjectsareallinvalid:
{ myBoolean : "true" }-ThemyBooleanfieldisbooleanandexpectsaboolean,notastring
{ myDate : "2021-03-29" }-ThemyDatefieldisadateandexpectsaDateobject:myDate:
new Date(2021,2,29),notastring
{ myPageCount : 2.5 }-ThemyPageCountfieldisanintegerandexpectsanumberwithoutany
decimals
{ myPrice : "19.99" }-ThemyPricefieldisacurrencyandexpectsanumbervalue,notastring
Examples
Thisscriptsetsthe'customerName'and'customerAddress'fieldsofadetailtablerow.
record.tables.details[3].set({customerName : "John Doe", customerAddress : "123 test road"});
ThefollowingscriptaddsanemptyrowtothetableandthenextractssomedataintotheDescription
fieldofthenewrow.
row = record.tables.myDescriptions.addRow();
record.tables.myDescriptions[row].set( {Description : data.extract((52+i*12),(66+i*12),0,1,"<br>")} );
Functions
copyFile()
Functionthatcopiesafiletothetargetfilepath,replacingitifitalreadyexists.
copyFile(source, target)
source
Stringthatspecifiesthesourcefilepathandname.
target
Stringthatspecifiesthetargetfilepathandname.
Example
Thisscriptcopiesthefiletest.txtfromc:\Contentintothec:\outfolder.
copyFile("c:\Content\test.txt","c:\out\")
Page 404