Select to view content in your preferred language

Search Widget Question

2148
4
05-06-2011 10:12 AM
BenReilly
Emerging Contributor
I had a quick question regarding the search widget.

Is it possible to get it to return a result from a partial search without needing % at the end of the search? For example, we have a map with building White Hall listed. How can I get White Hall to show up from searching "White" instead of "White%"?
Tags (2)
0 Kudos
4 Replies
BjornSvensson
Esri Regular Contributor
You can add the wild card to the search widget configuration file.

<expression>PD_NAME like '[value]%'</expression> 
0 Kudos
JonFisher
Emerging Contributor
To make it case-insensitive as well (e.g. for 'white' to find 'White Hall') you could use something like:
<expression>lower(PD_NAME) like lower('[value]%')</expression>
0 Kudos
BenReilly
Emerging Contributor
Perfect, that does exactly what I need it to. Thank you for your help!
0 Kudos
JoshJones1
Deactivated User
This thread helped me with two of my three problems I am having with the Search Widget.  Maybe one of the previous posters can help me here.  I was also wondering how to make it possible to only search a portion of a specific attribute.  Let's say I have a "Keywords" attribute column that has many different values that are associated with a specific building, such as departments or services that are located within the specific building.  Is it possible to allow the user to type a value that will be SOMEWHERE within the keywords column, or would I have to make a different column that contains each department/service that I want the users to be able to search?

Any help would be greatly appreciated.


-Josh Jones
0 Kudos