Support Article
Need to focus on the last item in repeating grid
SA-2017
Summary
You upgraded your application from PRPC 5.4 to Pega 7.1.2. The application has questions defined in decision trees and populated to screen one by one, based on answers to earlier questions.
In PRPC 5.4, focus was on the last question automatically now focus is moved to the first element on the screen.
Error Messages
No error message.
Steps to Reproduce
- Build a Flow Action with a repeating grid
- Write before-action activity to load the first question
- Write after-action activity to add questions based on the answers to previous question by traversing through a decision tree
- Use Property-Seek-Value to get the next question
Root Cause
The root cause of this problem is a defect in customer application code/rules.
Resolution
This issue is resolved through the following local change placed in their custom control:
<script>
function setFocusToLastQuestion() {
document.getElementById("<pega:reference name='$this-name'/>").focus();
}
pega.u.d.attachOnload(setFocusToLastQuestion,true);
</script>
Published January 31, 2016 - 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.