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

Expand When condition on a layout does not work correctly

SA-66114

Summary



Expand When condition on a layout does not work correctly.


Error Messages



Not Applicable.


Steps to Reproduce

  1. Create a layout
  2. Select header type as Collapsible
  3. Add Expand When condition
  4. Add a button on the section and configure a data transform by setting property on click of the button
  5. Click the button. The Expand When condition is false and the expanded header is not collapsed automatically


Root Cause



This is as per Pega Product design.


Resolution

Perform the following local-change:
  1. Navigate to the Presentation tab > Advanced options
  2. Set 'expandWhen' as Custom Casdading Style Sheets (CSS) class in the Advanced options where Expand When condition is referred
  3. In the UserWorkForm rule, add the below script:
    <script> 
    $(document).ready(function(){ 
    $(".ManualActivationCollapse").click(function(){ 
    var expandWhenDL = $(this).closest('.expandWhen'); 
    var parentExpandDiv = expandWhenDL.parent(); 
    if(parentExpandDiv){ 
    var hiddenInput = parentExpandDiv.children("#EXPAND-INDICATOR"); 
    hiddenInput.attr("value"," "); 

    }); 
    }); 
    </script>

 

Published November 29, 2018 - 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