Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Refresh when condition is not working

SA-30420

Summary



On the Perform harness the user has configured a section with a when condition to refresh the section and enable the Submit button whenever a new Attachment is added to the Work Object. A refresh When condition is added when the result count of the attachments pagelist change, but this condition is not triggered and the section is not refreshed.


Error Messages



Not Applicable


Steps to Reproduce



Add a attachment to the workobject and see that the section is not getting refreshed.


Root Cause



When an attachment is added, "AllAttachments" page is deleted and recreated. Due to this all the expressions bind to this page donot work. Deletion is happening in "Work-pzGetAttachment" activity, first step.

Resolution



Work around:
Save-as "Work-. pyWorkAttachments" section to application ruleset and add a non-auto geenrated section(in @baseclass) with below code:

<%

if(tools.findPage("Temp") == null) {
tools.createPage("@baseclass", "Temp");
tools.findPage("Temp").getProperty("pyLabel").setValue("");
}

if(tools.findPage("AllAttachments") != null) {
tools.findPage("Temp").getProperty("pyLabel").setValue(tools.findPage("AllAttachments").getProperty("pxResultCount") + "");
}

%>

Now on the section where refresh is required, have refresh condition as "Temp.pyLabel Changes".



 

Published November 18, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us