setFieldValue

Reading Time: 1 minute

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

see CONTROLLER_OBJECT.refresh

vcc.setFieldValue('city', 'Budapest');

There are no comments yet.
Subscribe to our newsletter
or Contact us!
Please note that by subscribing to our newsletter, you agree to receive regular email messages from VCC Live® about service related news and updates. By subscribing to our newsletter, you also agree that VCC Live® will use your data in accordance with the applicable Privacy Policy until you unsubscribe from the newsletter.