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 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.

Comment

Subscribe to our newsletter
or Contact us!