Question
Virtusa
US
Last activity: 4 Oct 2018 13:54 EDT
Auto-Complete control validaiton
Pega out of the box control Auto-Complete gives you the ability to type in few characters and based on the characters it gives you back the results based on the Source provided which can be Data page, RD etc.
Auto-Complete as a control does not validate the value selected or typed in manually is valid according to the source list of values.
so as a scenario, I have a region dropdown coming from Data page which has following values:
1. Newyork
2. Chicago
3. Dallas
4. Florida
5. Vegas
with this configured in Auto-Complete, I can type in LosAngeles and submit the form and validation would not trigger for the Auto-Complete value. I have to explicitly do validation in post activity for every Auto-Complete I have on my screen.
Is there a workaround solution for this ?
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
-
Likes (4)
Abhijit Saha vinodkumar vudayagiri Lucas Nascimento Dileep Narayan Koneru Priyabrata Nath -
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Hi Akash,
The autocomplete feature is not designed this way. View it more as a smart predictive text box, rather than a drop down. If you need to restrict your users to a specific set of options, then maybe a dropdown will better suit your requirements.
Else, if an autocomplete is what you desire, you will indeed need to fire your own validation against the list.
Thanks,
Rett
Virtusa
US
thank you Rett for your response,
The way the Auto-Complete look and feel is more of a dropdown rather than a text box(at least as user my vote is for that not sure about how many percentage of other folks will concur to me). The only difference between a Auto complete( up - down arrow image) and dropdown(down arrow image) is image by which I click and open dropdown and populate auto complete.
As a user I would feel it as a advanced dropdown rather than advanced text box because if it is a predictive text box(something like Google search) then it should not have that up-down arrow image to make the look and feel deceptive.
With my explanation, should I wait to hear something to be done from Pega or validating all auto complete in post activity is my option ?
Akash,
If you'd like to see a change to the default behavior to the AutoComplete control, you can submit an Enhancement Request to be evaluated by Pegasystems product management.
However, I'm going to have to respectfully disagree with you on the following statement:
Akash Pratap wrote:
The only difference between a Auto complete( up - down arrow image) and dropdown(down arrow image) is image by which I click and open dropdown and populate auto complete.
There is a major functional difference in that you can type free-form text into an AutoComplete (like a text input control), but you cannot type into a dropdown control.
Can I ask why you don't want to use a dropdown in this instance? It seems to match your requirement better than an AutoComplete.
-
JHONNY ARTAVIA CARMONA
Virtusa
US
The above example I gave is a sample scenario, so you are suggesting that I should use a dropdown when the list of values is greater than 5000 ?
Hi Akash,
If you had a dropdown with >5000 options, then no, I would say a dropdown is not a good choice of control.
At this point, if you wish to stay with an autocomplete, then you have two valid options.
1) Create your own validations
2) We can generate an enhancement request to extend or add a new feature to autocomplete to meet your business requirements. Just be aware, enhancement requests are evaluated to be considered in a future release, and there are no guarantees on time frames for their evaluation or their inclusion into the product.
Amazon.com Inc
US
Hi RettanahHean,
This problem is not just to Akash. This is for every Pega developer when they choose Autocomplete over Dropdown due to the large list. Pega only suggest to use AutoComplete over Dropdown when the lis has >100 values but it could lead into wrong data. I feel like Pega should provide an option to restrict the user entry on on change event. I hope Pega will come up some kind of fix for this.
Amazon.com Inc
US
Hi RettanahHean,
We would expect the AutoComplete behave as shown in the screen shot. The actuall Auto Complete text field is not editable and forces the user to choose an option from the list.
Accenture
IN
Hi ,
I am also having same issue. Is there a way to restrict user to select values only from the autocomplete list.
-
Raju Botu
Pegasystems Inc.
IN
Hi Sarita,
Thank you for posting your query in the PSC. This looks like an inactive post and hence, we suggest you create a new post for your query. Click on the Write a Post button that’s available on the top right pane of this page. Once created, please reply back here with the URL of the new post.
You may also refer this discussion link as a reference in the new thread
We have also sent you a private message opening up a communication channel in case you have any further questions.
Water NSW
AU
Hi
Any updates on this?
Any
NCS Pte. Ltd.
SG
Hi All,
To enable validation for any incorrect value entered in an autocomplete control follow the below steps.
1. Add OOTB 'lodash' JS and 'AutoCompleteValidation' (attached) files to your harness.
2. In autocomplete control, go to presentation tab and include 'autocomplete-validate' in 'Cell read-write classes'.
When you validate, it shows error message for any invalid value entered in the field
Hi All,
To enable validation for any incorrect value entered in an autocomplete control follow the below steps.
1. Add OOTB 'lodash' JS and 'AutoCompleteValidation' (attached) files to your harness.
2. In autocomplete control, go to presentation tab and include 'autocomplete-validate' in 'Cell read-write classes'.
When you validate, it shows error message for any invalid value entered in the field
You need to include the class name at every individual autocomplete to perform this validation which takes lot less time that manually including a validation.
Hope this helps.
Thanks and Regards,
Sushanth
-
RISHABH GORE Mahesh Haemathkar Nagendra Yerrabelli Egemen Celik bandna gupta and 20 More
Areteans Tech
AU
Did any one try this method and did it work ??
Cigna
US
Hi Sushanth,
You said Lodash.js file. But it is not present in your Attachments. Could you please check once and if it is missing please add.
Regards,
Bhanu
NCS Pte. Ltd.
SG
Hi Bhanu,
Please see it attached to my comment.
Thanks,
Sushanth
CollabPartnerz
IN
yes it is attached, i tried your approach it worked for me.
-
Egemen Celik RAGHU RAMAN Hemanth Guptha Pasupula Subba
CollabPartnerz
IN
It got worked for me also
-
Fransisco Junius Amadeus Hemanth Guptha Pasupula Subba