Question

Pegasystems Inc.
IN
Last activity: 19 Aug 2020 12:14 EDT
When Rule not getting evaluated through script
I am using a script to auto-click a button on a section but that has to be conditional clicked.
I try using pega:when but it does not get evaluated and the script doesn't execute. Without the when the script executes. If I place the when rule name as "Always" then also the script executes.
The content inside the when is having a flag value which is taken from clipboard. The value is already present in the clipboard.
Below is the code I am trying to implement:
<script type="text/javascript"> function AutoCloseTab(){ pega.util.Dom.getElementsByClassName("AutoSaveButton","button")[0].click(); var chatsection=pega.u.d.getSectionByName('CPMInteractionDriver','',''); pega.u.d.reloadSection(chatsection,'','',false,true,'-1',false); } </script> <pega:choose> <pega:when name="CheckActiveTime"> <script> var refreshinterval= setTimeout(AutoCloseTab,60000); </script> </pega:when> </pega:choose>
***Edited by Moderator Marissa to update Platform Capability tags****