Auto Complete Box Case Sensitivity
I have an Auto Complete Box in a form that only lists results if typed in uppercase only, which is how the data is stored. Users want to have the results shown if typed in lowercase also. Is this possible?
0
-
We have the same situation. Inside our Autocomplete box window our Where Clause looks like this...SITE_ADDR LIKE UPPER ('{0}%') . SITE_ADDR is the field that is being queried. The result is a list of potential addresses that gets smaller the more you type. Hope that helps. 0 -
I have figured this out so I just wanted to share the solution. I am using it to find and address.
1. In the DisplayForm Activity you need to create a Sequence Activity for runtime modifications.
2. Create three string variables for addressAutocompleteWhereClause, mapServiceURL, layerID.
3. In the runtime modifications create an assign activity. Populate it with the following:
addressAutocompleteWhereClause = "Upper(" + AddressFieldName + ") Like Upper('%{0}%')"
4. . In the runtime modifications create another assign activity. form.Find(Of AutoCompleteBoxFormItem)("AutoCompleteBox1").QueryServiceUrl = String.Format("{0}/{1}", mapServiceURL, layerID)
5. In the runtime modifications create another assign activity. Populate it with the following, using the ID of the Form in the Form Designer (In this case it is AutoCompleteBox1):
form.Find(Of AutoCompleteBoxFormItem)("AutoCompleteBox1").QueryWhereClause = addressAutocompleteWhereClause
6. In the runtime modifications create another assign activity. Populate it with the following:
form.Find(Of AutoCompleteBoxFormItem)("AutoCompleteBox1").QueryDisplayOutputField = AddressFieldName
It should now work. It seems like there should be an easier way to do this, but this is all I could figure out. Hope this helps someone else with the same problem.
- John0 -
Thanks for following up, John! 0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
3 kommentarer