Question

6
Replies
44
Views
ritvikm777 Member since 2019 3 posts
PEGA
Posted: 1 month ago
Last activity: 1 month ago
Solved

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****

Pega Platform 8.2.5 User Interface System Architect
Share this page LinkedIn