Select to view content in your preferred language

What SQL conditions does the sublayer definitionexpression recognize?

2050
4
Jump to solution
11-13-2012 09:46 AM
AndrewEdmonds
Deactivated User
What SQL conditions does the sublayer definitionexpression in the config file recognize?

I have tried LIKE, NOT LIKE, <>, and != to no avail.  I get a 1095 syntax parsing error on some on these.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
AnthonyGiles
Honored Contributor
Andrew,

Just for info if you ever need to do so in the future, you cannot use < and > in the config file as these are reserved for the opening and closing of tags. You need to use &lt; and &gt;

Regards

Anthony

View solution in original post

0 Kudos
4 Replies
AndrewEdmonds
Deactivated User
Never mind, LIKE and NOT LIKE appear to work!  I must have missed a quotation mark.
0 Kudos
AnthonyGiles
Honored Contributor
Andrew,

Just for info if you ever need to do so in the future, you cannot use < and > in the config file as these are reserved for the opening and closing of tags. You need to use &lt; and &gt;

Regards

Anthony
0 Kudos
AndrewEdmonds
Deactivated User
Thanks, Anthony.  That's useful info.
0 Kudos
RhettZufelt
MVP Notable Contributor
This works:

            <layer label="WastePoints" type="feature" visible="true" alpha="0.3"               
               definitionexpression="PHOTOS LIKE '%100D63_01.jpg'"
               url="http://gis01.wch-rcc.com/ArcGIS/rest/services/rkz/waste_images/MapServer/0"/>



other example for the same layer that work:

definitionexpression="PHOTOS IS NULL"

definitionexpression="PHOTOS = '100D63_01.jpg' "

definitionexpression="PHOTOS IS NOT NULL"


Basically the same coding as ArcMap but, you need to set it equal to definitionexpression and remember to include the single quotes if not comparing NULL(s)

also, this post shows how to code it for "dynamic" layers:  http://forums.arcgis.com/threads/64884-Popups-on-multiple-copies-of-same-service-layer?p=248918#post...

R_
0 Kudos