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

OnChange and Run activity ActionSet in grid function incorrectly

SA-104473

Summary



Use has a repeating grid layout in which a textbox is configured onChange of which, an activity must run and Refresh Other section must occur. 
On entering a value in the first row of the textbox, the activity executes correctly. The Step page for the activity is PageName.PxResults(1).
However, on entering the value in row two of the textbox, the Activity executes, but the Step page is still PageName.PxResults(1). That is, the changes made to the second row do not display. This works correctly the third time and is intermittent.


Error Messages



Not Applicable


Steps to Reproduce

  1. Create a repeating grid such that users can enter values.
  2. Create another repeating grid layout and source it with the PageName.PxResults (result of the first grid).
  3. Create a textbox in the first grid.
  4. Set an onChange event and add multiple Action sets, such as Run activity, Refresh other Section section, Refresh current row, Run script invoking the makeUIBusy function, Post value and so on.
  5. Invoke both the sections in a single section.


Root Cause



Limitation of Pega 7 Platform. The Platform does not support multiple actions.

When consecutive actions are present on the onChange event, the following action cancels if the previous action is in progress (hence, subsequent onChange event is discarded).

With Pega 8 Platform, this use case works by default.



Resolution



Perform the following local-change:

Add the below script in the UserWorkForm to remove the focus from the next textbox:

<script>
var makeUIBusy = function (evt) {
    if (pega.u.d.gBusyInd) {
        var origBusyIndInterval = pega.u.d.gBusyInd.busyIndInterval;
        pega.u.d.gBusyInd.busyIndInterval = 0;
    } else {
        var origBusyIndInterval = pega.u.d.busyIndInterval;
        pega.u.d.busyIndInterval = 0;
    }
    pega.u.d.setBusyIndicator(document.body, false, true);

    window.setTimeout(function () {
        document.querySelector("#pega_ui_mask img").tabIndex = 0;
        document.querySelector("#pega_ui_mask img").focus()
    }, 0);

    pega.u.d.gBusyInd.busyIndInterval = origBusyIndInterval;
}

var hideBusyIndicator = function () {
    pega.u.d.gBusyInd.hide();
}
</script>

Published 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