samwoo Posted January 16, 2020 Posted January 16, 2020 Hello, How does one clear the value in a field that is using a Data Query on the PCF? In this instance we are looking up all users, and if someone accidentally clicks on a user in the list, they cannot clear the selection. We have a condition on two other fields that appears if the Data Query field is blank (assuming the person who is moving isn't actually in the list... which will prompt an investigation as to why they were not in Hornbill) the two fields will allow the user to manually type in a person's name and Email Address. This was tested in both Chrome and IE11 via Service Manager and the Service Portal. This is frustrating users who have to refresh the whole page or go back and start the form again in order to clear the field if they've made a mistake or clicked on the wrong thing. Thanks, Samuel
Miro Posted January 16, 2020 Posted January 16, 2020 Hi @samwoo, This is all working exactly like intented. If field is not mandatory then you can select "empty item" which is fine as you expect that user could skip that field. Different situation is when field is mandatory, is always required so there is no "empty item" but also there is no selection yet made. Once user pickup anything it can't be set empty as is mandatory. Hopefully it make sense. In that case if you want to give a user freedom to leave that field empty you should uncheck mandatory option in field configuration. Thank you, Miro
samwoo Posted January 16, 2020 Author Posted January 16, 2020 Just now, Miro said: Hi @samwoo, This is all working exactly like intented. If field is not mandatory then you can select "empty item" which is fine as you expect that user could skip that field. Different situation is when field is mandatory, is always required so there is no "empty item" but also there is no selection yet made. Once user pickup anything it can't be set empty as is mandatory. Hopefully it make sense. In that case if you want to give a user freedom to leave that field empty you should uncheck mandatory option in field configuration. Thank you, Miro Hi @Miro, Thanks for the explanation - that does in fact makes perfect sense, but I am not sure it would work in my case. Basically I need this field to be mandatory - however there is a condition that makes it non-mandatory if the other field is populated... but if I accidentally populate this mandatory field which hides the other field, I cannot clear the value in there. - this was hard to try and explain in words - lets see if pictures do it justice. This is what the form looks like when a user first navigates to it: I need to search for a Joe Bliggs, but being me, I accidentally clicked on Joe Bloggs: I know that Joe Bliggs doesn't exist, but I cannot clear the field where I selected Joe Bloggs by accident: What should happen is there should be an X where I can clear the selection, and this will display the free text fields. When I enter text in the free text fields, the Data Query becomes non-mandatory and is not displayed on the form: Even if the field is Mandatory, we should still have the option to clear it. Maybe there should be another option in the Progressive Capture Flow to allow field to be cleared. I mocked up something using the F12 Developer Tools (see the Allow Clear Field? option at the bottom): Thanks, Samuel
Miro Posted January 17, 2020 Posted January 17, 2020 Hi @samwoo, I got you and I can't find any scenario when it could be not valid to have it there all the time. I will bring clear button for this control even in mandatory mode. Thanks, Miro
samwoo Posted January 17, 2020 Author Posted January 17, 2020 Hi @Miro, Many thanks for this - I will keep an eye out for the release notes. Take Care, Samuel
samwoo Posted January 29, 2020 Author Posted January 29, 2020 Hi @Miro, Many thanks - will check it out. Samuel
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now