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

Validation error message window appears again and again

SA-8814

Summary



In a scenario, for the repeat grid for Date fields, user uses Date Time control with display mode as ‘Dropdown list’. At run time when user tries to add new row to repeat grid and if wrong date format (for example selecting Date or Month only) is provided then system showing popup window with error message.

When user clicks on Ok button on the popup window and tries to modify date field, the popup window re-appears. User is not able to correct the date as it is goes to infinite loop.

Error Messages



Popup window with error message ‘Please correct flagged fields before submitting the form!’

Steps to Reproduce



1. Create a repeat grid with one of the column is DateTime control.
2. In the Datetime control presentation settings select DisplayMode as 'Dropdown Lists' and Enable Calendar as 'yes'.
3. At runtime add a row in repeat grid with improper date value in DateTime field.
4. Add another row in grid and click on save button.

System displays the error message in popup window "Please correct flagged fields before submitting the form!"
Try to correct the date using dropdown, this error message keeps popping up and not possible to correct the date.


Root Cause




This is combination of following issues:

1. Error window keeps popping up infinitely.

Root cause for this is the section which contains the repeatgrid has the corrupted XML. Reconfiguring the repeatgrid solves this issue.

2. Error icon is not disabled even when correct date is entered and click on Save button.
This is issue with product.

Resolution



This issue is resolved through the following local change:
Reconfiguring repeatgrid has resolved the issue of error message popup.
Placing below script in userworkform resolves the issue with error icon that appears with Date fields.
 
<script>
function fixDateTime(){
                try{
                                var Calenders = $("[data-calendar='Calendar']");
                                if(Calenders && Calenders.length && Calenders.length > 0){
                                                for(var i=0; i<Calenders.length; i++){
                                                                var cal = Calenders[i];
                                                                if(cal.tagName=="INPUT"){
                                                                                var calName = cal.name;
                                                                                var calErrorName = calName+"Error";
                                                                                var errorDiv = document.getElementById(calErrorName);
                                                                                if(errorDiv){
                                                                                                cal.value = "";
                                                                                }
                                                                }
                                                }
                                }
                }catch(err){
                }
}
if(pega && pega.u && pega.u.d){
                pega.u.d.attachOnload(fixDateTime, true);
}
</script>

 

Published January 31, 2016 - 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