Conditions on action set are not working as expected
User configured a Submit button with event onclick and below actions:
- Refresh Section in which an Activity is called and a property value is set
- Add Work with a When condition using above property
At run time, "Add Work " is triggered irrespective of the When condition.
No Error message.
Steps to Reproduce
- Configure a button with action "Add Work"
- Apply When condition in action
- Run portal and click button
- "Add Work" should not trigger if When condition fails
The explanation for this is that the data-click/data-change meta-data on the control can only update if the DOM is refreshed (for example, with a section-refresh or post-value) and cannot update correctly in the middle of the execution of an Action Set.
Place the property which is used in When condition, in the UI so that it is available in DOM at run time. Make it hidden.
As the property is present when the first action (Refresh) is performed and as the property is changed, DOM gets re-generated and the When condition gets re-calculated based on the property which is present in DOM.