Search Widget won't return results for records with spaces.

934
6
Jump to solution
09-27-2012 01:10 PM
ReedDavis
New Contributor
I have my search widget setup to do searches for county input by different fields, my two word counties (ex: Jefferson Davis) had underscores initially and would produce a return if I searched exactly how it appeared in the table (Jefferson_Davis). The end user will likely not know to include an underscore so I removed them, now nothing is returned. All other counties return results fine however they are single word names. The search is also very much case sensitive. What can I do to allow the user to primarily use space in county name, secondary to disable case sensitivity?
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
RD,

   So there are lots of examples of using SQL wildcard searches using the LIKE operator, both on many forum post and examples of this provided in the original eSearchWidget.xml that came with the widget.

Upper(PARCELID) LIKE Upper('[value]%')

View solution in original post

0 Kudos
6 Replies
RobertScheitlin__GISP
MVP Emeritus
RD,

   So there are lots of examples of using SQL wildcard searches using the LIKE operator, both on many forum post and examples of this provided in the original eSearchWidget.xml that came with the widget.

Upper(PARCELID) LIKE Upper('[value]%')
0 Kudos
ReedDavis
New Contributor
Got that working, but it is still case sensitive.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
RD,

  The command Upper in the SQL I provided eliminates the case sensitivity. If you are saying it does not than you are seeing something I have not in my close to 2 decades of experience.
0 Kudos
ReedDavis
New Contributor
Now the search is not working at all, I click the search widget icon it pops up, enter a value and click the search... nothing happens, have you seen this one before?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Reed,

   So there is no error message displayed anywhere? What about when you manually switch to the results view by clicking the table icon at the top of the widget, does that view show anything at all?
0 Kudos
ReedDavis
New Contributor
Solved, I created the searches in a older version of my app so the search URL was incorrect and needed to be updated. Specifically, I just cleaned out the rest directory so until I deleted the old version my searches were still returning results because the data was the same, I'm guessing it was pulling the info form the older version.
0 Kudos