Select to view content in your preferred language

Search Widget like statement

868
2
04-21-2011 09:27 AM
PaulMcBride
Occasional Contributor
I'm trying to get a like statement to work for the searchWidget in the flexviewer 2.3.
First this is the code that works...

<?xml version="1.0" ?>
<configuration>
    <layers>
        <layer>
            <name>Madison County Parcels</name>
            <url>http://arcgis01.madisoncty.com/ArcGIS/rest/services/parcels/MapServer/25</url>
            <expression>KEYNO = '[value]'</expression>
            <textsearchlabel>Search by Parcel ID  [ Example: 00-0000-0-000, Smith]</textsearchlabel>
            <titlefield>Owner</titlefield>
            <linkfield></linkfield>
            <fields all="false">
             <field name="Owner"/>
             <field name="State_PIN"/>
             <field name="KEYNO"/>
            </fields>
        </layer>
    </layers>
    <zoomscale>7200</zoomscale>
</configuration>

<!--
    See Search widget documentation at
    http://links.esri.com/searchwidget

Now when I add the like statement I get no returns...

<?xml version="1.0" ?>
<configuration>
    <layers>
        <layer>
            <name>Madison County Parcels</name>
            <url>http://arcgis01.madisoncty.com/ArcGIS/rest/services/parcels/MapServer/25</url>
            <expression>KEYNO like '[%value%]'</expression>
            <textsearchlabel>Search by Parcel ID  [ Example: 00-0000-0-000, Smith]</textsearchlabel>
            <titlefield>Owner</titlefield>
            <linkfield></linkfield>
            <fields all="false">
             <field name="Owner"/>
             <field name="State_PIN"/>
             <field name="KEYNO"/>
            </fields>
        </layer>
    </layers>
    <zoomscale>7200</zoomscale>
</configuration>

<!--
    See Search widget documentation at
    http://links.esri.com/searchwidget
-->

Any help at all would be great cause I want to add the State_PIN and Owner fields to the expression but need to get at least one of them to work with the like statement.

Thanks
Tags (2)
0 Kudos
2 Replies
JustinRiggs
Emerging Contributor
This one works for me... maybe comparing it to yours will help...

Upper(name) LIKE Upper('%[value]%')
0 Kudos
PaulMcBride
Occasional Contributor
Thanks, that worked for that expression!
0 Kudos