setFieldValue
Sets the selected value of the field.
Description
vcc.setFieldValue(field: string, value: object, [key: string]): void
It sets the value to the field, and then triggers a changed event.
Parameters
field
The name of the field, or null if you only trigger the afterSetData event on a control.
value
The value of the field. The value format depends on the field type:
- multiple: the valueIds of the selected elements or array of numbers
- simple: the valueid of the selected element or number
- text: the value itself as a string
key
A key of the field to search. (Optional)
Return values
none
Example
vcc.setFieldValue('city', 'Budapest');
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.