Why doesn't Pega validate value selected by autocomplete?
Customer asks: Why doesn't Pega validate value selected by autocomplete?
Let's say we have a field where user specifies approver ID. After user selects approver@MyApp, and edit it to something like approverXYZ@MyApp which does not exist in system, system does not complain. Some customer expects any value selected by autocomplete also validate it by itself. So if edited value does not exist in the original autocomplete list, system should complain.
One way to avoid this is to use dropdown as this way user can never edit it. But dropdown can't display multiple information like autocomplete does. Is there any workaround for this? I don't feel like adding another validate as this is more than necessary.
***Updated by moderator: Lochan to update platform capability***
We have the same problem. Using a drop-down list is not an option for us (need to display multiple columns and the list is too long). I'm also not a fan of the JS workaround suggested in the other post.
The main issue is that the Pega Change event (as defined on the property) doesn't always fire consistently after typing a value in the autocomplete. If you don't subsequently select a value from the presented list, the change event only triggers if you click outside of the textbox - but NOT on the submit button. But if you type a value and then click directly on the Submit button, the Change event doesn't trigger.
I was just wondering if the suggested Enhancement Request in the other thread has been submitted by anyone yet. It's desperately needed, and it sounds like many others have the same issue. There should be a checkbox in the properties of the autocomplete field that indicates if the entered value needs to exist in the list or not. We are currently using Pega 7.3.1. Is it improved in newer versions?