Support Article
FinishAssignment with When condition doesn't run on single click
SA-81640
Summary
Finish Assignment action containing a When rule (this When rule validates if the boolean property is true) does not run on a single click of a button. This occurs even when the boolean property is set to true through an activity in the action that is invoked before the Finish Assignment.
Error Messages
Not Applicable
Steps to Reproduce
- In any section, add a button that executes a local action.
- In the Actions tab of the button, add a Refresh this Section on the Click event.
- In the Refresh this Section, add an activity that sets a boolean property of the same class of the section to true.
- In the same Click event, add a Finish assignment action with a When rule which verifies if the boolean property is set to true.
- Execute the flow. Click the button with the Click event and the assignment does not finish until the user clicks it again.
Root Cause
Since the value for the boolean property in the Document Object Model (DOM) is not updated on the single click when the When rule in the Finish Assignment action is invoked, the same action is not called.
Resolution
Perform the following local-change:
- In the section, add a checkbox for the boolean property which was set to true in the activity that is called in the Refresh this Section action.
- In the Finish Assignment action, used Other property instead of the When rule in the dropdown with the boolean property = true condition.
- Use the below style in the UserWorkForm to hide the checkbox:
<style>
#pyWorkPageValidLoginValidLogin{
visibility:Hidden ! important;}
</style>
The pyWorkPageValidLoginValidLogin ID above is the ID of the checkbox generated on the section observed by pressing F12 and selecting the Element tab.
Tags:
Published August 15, 2019 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.