Select to view content in your preferred language

Enhanced Search Widget Wildcard Search Syntax

1644
13
Jump to solution
11-07-2012 05:20 AM
MichaelVolz
Esteemed Contributor
To All Enhanced Search Widget Users:

I have a search with an ID field of 8 characters where I would like to just have a wildcard for the last character with a requirement of at least 7 characters before the Search is enabled.  I would just like to change the config file and avoid modifying the uncompiled action script code, if that is possible.

This is the search I have for matching the end of the user input value, but it allows too many results to be found.
<value prompt="Example: M1234567" isvaluerequired="true">upper(ID) LIKE upper('[value]%')

I have values of say M1234561, M1234562, M1234563, M1234564, M1234565 and M1234559, M1239999, M1230000.

I want to just get back the first 5 values (M1234561, M1234562, M1234563, M1234564, M1234565) if I enter M123456.  I would not want the user to be able to search for M123 which would retrieve all of these records.  The feature class has thousands of entries so I am currently getting thousands of returns if I am able to perform a search with less than 7 characters.
Tags (2)
0 Kudos
13 Replies
SladeBridges
Emerging Contributor
Slade,

   OK, from your first post it sounded like you had already tried to add a wild card to your expression and it was not working.

Here is what you are looking for.

<value prompt="Example: NAME">upper(NAME) LIKE upper('[value]%')</value>                         


i get the same result, fault 400
0 Kudos
SladeBridges
Emerging Contributor
i get the same result, fault 400


ahhhhh, take out the =, my fault
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Slade,

   Attach your whole eSearch.xml.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Slade,

   Actually just email it to me.
0 Kudos