Support Article
Dynamic Layout does not refresh onChange of page list count
SA-105871
Summary
A dynamic layout in a section does not refresh onChange of the Page List Count which is triggered by an update on the popup window.
Error Messages
Not Applicable
Steps to Reproduce
- Add a dynamic layout in a section
- Invoke a section (for example, A) from this dynamic layout.
- Use a table in Section A with a page list as the source of the table (which contains the list of the uploaded documents of a particular category).
- Add a button in Section A,.
- Click the button. A popup window opens. In this case, the user has the functionality to upload the documents.
- Click Upload. The popup window closes and the page list is refreshed. This is observed from the Clipboard.
- On the main dynamic layout, configure a condition such that onChange of either the pzInsKey or pxResultCount, the dynamic layout refreshes. However, this works intermittently.
Root Cause
Issue with timing. If the Reload section call transpires before the SubmitModalFlowAction activity call, the issue occurs. This happens when files are uploaded in an overlay (this takes time).
Resolution
Perform the following local-change:
- Launch the local action on click of the link.
- Add the below script in the UserWorkForm.
<script>
function customisedCallBack() {
pega.u.d.submitModalDlgParam.userCallbackObj = function() {
setTimeout(function() {
var sectionDiv = pega.u.d.getSectionByName("<sectionName>");
pega.u.d.reloadSection(sectionDiv, '', '', false, false, '', false);
});
}
}
</script>
- Invoke the script.
Published April 9, 2020 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.