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
- Create a layout
- Select header type as Collapsible
- Add Expand When condition
- Add a button on the section and configure a data transform by setting property on click of the button
- 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:- Navigate to the Presentation tab > Advanced options
- Set 'expandWhen' as Custom Casdading Style Sheets (CSS) class in the Advanced options where Expand When condition is referred
- 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
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.