getFieldValue
Gets the selected value of a field.
Description
vcc.getFieldValue(fieldName: string, [key: string]): FieldValue[] | FieldValue | string | []
Parameters
fieldName
The name of the field.
key
If fieldValue is an object, then this key can be used to return a specific value of an object (e.g. export_value).
Return values
Depends on the field type:
- multiple field: an array of FieldValue objects or an empty array
- simple field: FieldValue object, the selected value or {String|Number} if key is specified and available or null if there is no selected object or key is unavailable
- text field: the value of the field as a string
Example
var age = vcc.getFieldValue('age');
var city = vcc.getFieldValue('city');
if (age >= 20 && age <= 30 && !city) {
return false;
}
Comments
Can’t find what you need? Use the comment section below to connect with others, get answers from our experts, or share your ideas with us.
There are no comments yet.