Returns the actual number of occurrences of a named field within a specified record.
For all but variable fields this simply returns the schema defined number of occurrences of the field.
the record name
the record index
the field name
the actual number of occurrences of the field
Get a field value.
This allows an item to be addressed using a key of the form
recordName(recordIndex).fieldName(fieldIndex). Indexes may be omitted in
which case 0
is assumed.
Example:
// Get field value with record & field names and indices
const value = model.get("record", 0, "field", 0);
// Get field value with key
const value = model.get("Address.Name");
the name of the record
the index of the record
the name of the field
the index of the field
the field value
Returns the actual number of occurrences of a named record.
If the record is not variable, this is the same as the defined number of occurrences in the schema
the record name
the actual number of occurrences of the record
RecordV2 data model.
A read only model can be created from any RecordV2 object using the asModel method. The model then provides direct access to the fields within the data. Fields may be accessed either by explicitly specifying the record and field occurrence or by specifying a key of the form:
recordName(recordIndex).fieldName(fieldIndex)
Indexes start from 0 and if omitted then 0 is assumed. The record name may also be omitted, in which case the first record definition is accessed. This form of addressing is useful when there is only one record definition.
So valid keys are:
Address(4).AddressLine(3)
AddressLine
occurrence within the 5thAddress
recordAddress.Name
Name
field within the first (or only)Address
recordAddressLine(1)
AddressLine
field within the first (or only) recordName
Name
field within the first (or only) recordThe RecordModel.recordCount and RecordModel.fieldCount methods are useful for determining the actual number of occurrences of variable multiplicity items.
6.0