2022.2

Table Of Contents
Field Type Description
fields
Array Thefieldvaluesthatbelongtothisrecord.
id
Number Theidofthisrecord.
index
Number Theone-basedindexofthisrecord,orzeroifnodataisavailable.
<tableName>
Arrayof
records
Shortcuttoaccessatableinthetablesarray.Forexample,youcanuse
record.Productstoaccessrecord.tables.Products.
tables
Array Thedetailtablesthatbelongtothisrecord.
Accessingfieldsandtables
Youcanaccessaspecificfieldvalue:
l
usingthefield'sname:record.fieldName(casesensitive)
l
viathefieldsarray,byname:record.fields.fieldnameorrecord.fields['field-
name'](caseinsensitive)
Ifthereisnofieldwiththespecifiedname,record.fields.fieldnamereturnsanemptystring,
whereasrecord.fieldnamewillreturnundefined(unlessthereisatablewiththesamename,in
whichcasethetableisreturned).
Adetail tablecanbeaccessedusingitsname:record.tableName,orviathetablesarray.Either
waythetablenameshouldbefollowedbyanumericindexforarecordinthatdetailtable.
Forexample,toaccessthevalueofthefield"prod_id"inthefirstrecordofadetailtablecalled"detail",
youcanuse:
record.detail[0].fields.prod_id or
record.tables["detail"][0].fields.prod_id or
record.tables.detail[0].fields.prod_id or
record.detail[0].prod_id
Ifthereisnotable(andnofield)withthespecifiedname,record.tableNameresultsinundefined.
Inordertoloopoverrecordsinadetailtableyoucoulduseafor(...in...)loop(see"for(...in...)"on
page1174),forexample:
var records = record.tables.detail;
for (var i in records) {
var rec = records[i];
...
}
Page 1200