In an autocomplete box, how do I require the user to choose from the dropdowns?
Hey all -
Working in Workflow for Essentials (not Workflow5) - I have an autocomplete box that is mostly working great. It queries like it should, and successfully passes the chosen item to subsequent activities.
However, if the user types in their term and doesn't pick from the list, their entry text is not assigned to the output argument and the subsequent activity throws an error. Users typing instead of clicking the dropdown could happen often enough to be a concern, as list items are fairly short and easy (e.g. "K103"). I could see someone typing that in, noticing it matched the autocomplete listing, and just clicking the submit button without actually choosing the autocomplete item.
Fundamentally, I don't what property is associated with "yes, this value was chose from the autocomplete list" and how to access that value. Is this a property in Workflow Essentials? And if that's not an option, how do I assign user entry text to the autocomplete form item argument name?
I would be OK with either of the following approaches if the user doesn't choose from the autocomplete list, but I can't figure out the logic driving either of them. I could either:
1) Have an alert pop up and let the user know they must choose from the list. Then cycle them back to the form with the autocomplete box. Again, what sort of Flow Decision/If Statement gets at typed value vs clicked from list value? But once I have that property, this would work
2) Assign their typed entry to a variable/argument and pass it onward in the workflow. Again for this, how do I pass that user entry text to the autocomplete form item argument name (or a variable - just something that can be used outside the display form activity)?
I've found both of these discussions about '.value' vs '.label' (https://support.geocortex.com/essentialsGSCForumDetail?sub-nav=forum&main-nav=essentials&id=0D5f200005gjMvHCAU, https://support.geocortex.com/essentialsGSCForumDetail?sub-nav=forum&main-nav=essentials&id=0D5f200005HfIikCAF), but I'm guessing they relate to Workflow5, as I get " 'Value' is not a member of Geocortex.Forms.Client.Items.AutoCompleteBoxFormItem" when I try that syntax in an assign statement.
Thanks for any help,
Jena
0
-
This is WF4 right? Whatever the user types in an autocomplete will be in the output argument, so your option 1 is the way to go: After the user presses OK, use a querytask to see if the value is valid, and if not, go back to the same displayform. 0 -
Berend -
Thanks for your response. I had just figured that out (that the user entry was actually assigned to the argument by default); I was, as usual, trying to make it more complex than it was.
Additional info for other folks who may come across this post:
In that query task to check the argument validity, I made it case-insensitive to make it easier for users. If I had typed in "k103" and was told it didn't match "K103", I would be annoyed. Note that the syntax for uppercase differs between different parts of the Where clause depending on if it's SQL or not. So my Where statement ended up looking like:
"UPPER(LIST_ITEM) = ' " + UserEntryArg.ToUpper() + " ' "
-Jena0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare