Discussion
Pegasystems Inc.
GB
Last activity: 9 Jun 2023 8:00 EDT
How to set additional property values on an autocomplete control
There are scenarios where users might require the use of an Auto Complete control in a repeating grid where the user wants to include extra properties other than associated property.
In addition to setting the property associated with the control, the user has set additional property values from the report definition used as the list source of the control. The control is only setting the property associated with the control and not the others.
The user may find that the other property is not getting set as the repeating grid turns read only if they Refresh the parent section using onChange of the field.
Steps to Reproduce
- Put an autocomplete control in the Case Manager portal.
- Use a report definition as the list source of the autocomplete
- In addition to setting the property associated with the control, set several additional properties as well
- Test to confirm the autocomplete control is not setting additional properties.
Root Cause
By default there is no onChange event configured for the autocomplete control. At runtime only selecting a value from the drop down will set the properties. After submit it will set the properties.
Resolution
This issue is resolved through the following local change:
The user needs to add an on-change event to refresh the parent section. This will result in the additional values being submitted and as a result properties will be set. Note: Do not use the onChange post value event because post value only works with editable fields and also it will block the refresh section submit action. As a result only the associated property will get set and not the additional properties.