{dialog.object}setValue Method


{dialog.Object}.setValue(name, value [, honorChangeEvent])



The UX Control ID. For multi-value controls, a '[]' must be included after the control ID. For example, 'CHECKBOX_1[]'

valueAny Type Array

The value to set in the control. Depending on the control, this may be a single value or an array.


Default = true. Causes the onChange event for the control to fire when the value is set. This includes watch events for client-side expressions (show/hide, enable/disable, calculated fields, etc) that reference the control as well as flags the field as dirty in the UX Component. If you don't want client-side events to be triggered, set the honorChangeEvent argument to false.


Set the value of a control in the UX Component.


The setValue() method can be used to set the value of a control in a UX Component.

Unlike standard Javascript techniques to set the value of a control, the .setValue() method sets the control's state in the UX Object to be dirty (in the same way that the control becomes dirty if the user types a value into the control).


Set value in 'LASTNAME' field.


Repeating Sections

If the field you want to set is in a Repeating Section, use 'name:rownumber' for the field name, otherwise the row with focus will be updated.

This example sets the value in 'LASTNAME' field in the 3rd row of a Repeating Section.


Multi-value Controls

Checkbox and Multi-value Dropdownbox Controls that can have more than one value are set using array syntax. For example, assume that 'FAVORITECOLOR' is a checkbox control that can have multiple selections and you would like to set the value to 'alpha', 'beta', and 'gamma'. The example below will set the value:


Notice that the fieldname has a trailing [] - to indicate that it is an array of values, and the values you want to set are passed in in the form of a Javascript array.

List Fields

Field values in a List control are set using a special syntax:



  • name_of_list is the List control's ID.
  • field_name is the field in the list to update.
  • logical_row_number the row to update.

If you omit the row number, the field in the selected row is updated.

// Update City field in logical row 1 (second row of list):

// Update City field in current list row:

See Also