9.0 |
|
|
|
Get the value of the field as specified by the name parameter for this embedded file. When attempting to get a field value that is not defined in the collection schema, null is returned.
name |
A string that identifies the field of interest. |
includePrefix |
(Optional) A Boolean value indicating whether the prefix should be included with the returned string. If true, the prefix is included with the return string. The default is false. |
The value of the field, or null if field is not present in schema.
9.0 |
|
|
|
Type conversion is performed when setting field values. The type conversion is determined by the collectionField in the schema. When attempting to set a field value that is not defined in the schema, an exception is raised.
name |
A string that identifies the field of interest. An exception raised if name not present in schema. |
value |
A string, a number, or a date that specifies the value of the field. The value will be type-coerced to match the schema. |
prefix |
(Optional) A string that specifies the field value prefix. |
The value of the field, or null if field is not present in schema.
Get and set field values of the first data object in this collection.
var d = this.dataObjects[0];
d.setFieldValue("subject", "New laptop!", "RE: ");
// Now get the same field value we just set. Here s = "RE: New laptop!"
var s = d.getFieldValue({ name:"subject", includePrefix:true });
// Get the same field value, with includePrefix set to false, the default
// Now the value of s is "New laptop!".
s = d.getFieldValue("subject");
// Sets subject to "A. C. Robat" and clears prefix
d.setFieldValue("subject", "A. C. Robat");