When Rule not working as expected in the action set
Modal dialog is launched only on the second click event of a link. The When rule configured on the condition of an action works only after the second click event of the control.
Steps to Reproduce
- Configure a link in a section.
- Add an event-action set on the click of the link.
- Add the first action to the refresh section with a data transform to set some properties.
- Add the second event to launch the modal dialog with the When condition based on the values set on the previous action.
This behavior is as per Pega product design.
A When rule evaluates on the value set in the same action set (previous action of the same action set). Hence, the required results display in the second click. The data-change on the control can only update if the Document Object Model (DOM) is refreshed. It cannot update correctly in the middle of the Action Set execution.
Perform the following local-change:
- Configure the modal section in another dynamic layout of section where the link is clicked.
- Provide a Visibility conditional expression or When rule as required for the dynamic layout.