JavaScript

{dialog.object}setValueFrom Method

IN THIS PAGE

Syntax

{dialog.Object}.setValueFrom(target,source [, honorChange])

Arguments

targetArray

array of controls.

sourceArray

array of controls.

honorChangeBoolean

Default = true. Causes the onChange event for the control(s) 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(s) as well as updates the "is dirty" flag for the field in the UX Component. If you don't want client-side events to be triggered, set the honorChange argument to false.

Description

Combines the .getValue() and .setValue() methods into a single method.

This sets the value in a control with the value from another control. 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. target and source can be an array of controls.

Example 

Set value in 'LASTNAME' field with the value in the 'FIRSTNAME' field.

{dialog.object}.setValueFrom('LASTNAME','FIRSTNAME');

Example 

Pass in an array of controls.

{dialog.object}.setValueFrom(['T1','T2','T3'],['S1','S2','S3']);

See Also