Support Article
No way to activate newly added tab to tabbed repeat
SA-40819
Summary
User configured a tabbed repeat layout and when users adds a new tab using a button, the focus does not go to the newly added tab but remains at the home tab/first tab.
Error Messages
Not Applicable
Steps to Reproduce
1.Create a tabbed repeat layout
2.In the layout Create a button to launch a local action which is configured in menu (navigation rule).
2.In the local action copy the content of the parent tab and create a new tab 2.
3.In the second action call refresh-other section to refresh the section which has the tabbed repeat layout.
4.Observe that the focus is not shifted to the newly created tab.

Root Cause
A defect in Pegasystems code or rules
Resolution
Add the below script in userworkform to fix the behavior:
<script>
$(document).ready(function() {
if(pega && pega.control && pega.control.PlaceHolder && pega.control.PlaceHolder.getValue) {
pega.control.PlaceHolder.getValue = function(C) {
if (C.getAttribute("isplaceholder") === "true") {
return ""
}
var E = C.value;
if(C.getAttribute('name') && C.getAttribute('name').indexOf("EXPANDED") > -1) {
E = "ADD";
}
if (C.tagName && C.tagName.match(/^(input)$/gi)) {
try {
if (C.getAttribute("data-formatting") === "done") {
var B = C.getAttribute("data-value");
if (typeof (B) != undefined && B != null) {
E = B
}
}
} catch (D) {}
}
return E
}
}
});
</script>
Published October 9, 2017 - 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.