<br><font size=2 face="sans-serif">Filter is defined at the LAYER level
while expression is defined at CLASS level.</font>
<br><font size=2 face="sans-serif">So you could use expression for rendering
filtered values....</font>
<br>
<br><font size=2 face="sans-serif">using expression without filter means
that you query all the data.</font>
<br><font size=2 face="sans-serif"><br>
</font>
<p>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>"Rahkonen Jukka  (Tike)"
<jukka.rahkonen@mmmtike.fi>@lists.osgeo.org</b> </font>
<br><font size=1 face="sans-serif">Envoyé par : mapserver-users-bounces@lists.osgeo.org</font>
<p><font size=1 face="sans-serif">2014-05-14 09:05</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">A</font></div>
<td><font size=1 face="sans-serif">"mapserver-users@lists.osgeo.org"
<mapserver-users@lists.osgeo.org></font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Objet</font></div>
<td><font size=1 face="sans-serif">Re: [mapserver-users] About FILTER and
FILTERITEM</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br>
<br>
<br><tt><font size=2>Hi,<br>
<br>
Thank you very much, Christy. By your example I made some tests and now
filters like this work for me<br>
FILTER (([WORKERS]>20000000) OR ("[STATE_FIPS]"="17"))<br>
<br>
The secret element was the right syntax for string attributes  ("[STATE_FIPS]"="17").<br>
Now when I know how it must be used I can find corresponding examples from
the expression page of Mapserver documentation. Could someone explain shortly
what is the difference between filter and expression? To me they seem to
do pretty similar work.<br>
<br>
-Jukka Rahkonen-<br>
<br>
Christy Nieman wrote:<br>
<br>
> You do not need to set both FILTERITEM and FILTER.  You can just
set FILTER to<br>
> an expression using as many attributes as you need. e.g.<br>
> FILTER (( [POPULATION] < 500000 ) AND ("[DISPLAY]" ==
"1")). Just like you can<br>
> have multiple attributes in a class EXPRESSION.<br>
> <br>
> I think it's the section of the document that is key - the "MapServer
Expressions"<br>
> section talks about using FILTER and EXPRESSION in more complex logical<br>
> expressions, where as the section you quoted is talking about basic
string<br>
> comparison.<br>
> <br>
> Christy<br>
> <br>
> On 14/05/14 08:03 AM, Rahkonen Jukka (Tike) wrote:<br>
> > Hi,<br>
> ><br>
> >  From document page: http://mapserver.org/mapfile/expressions.html<br>
> > "To use a string comparison for filtering a LAYER, both
FILTERITEM and FILTER<br>
> must be set. FILTERITEM is set to the attribute name. FILTER is set
to the value<br>
> for comparison. The same rule applies to CLASSITEM in the LAYER object
and<br>
> EXPRESSION in the CLASS object."<br>
> ><br>
> > That would mean that only one attribute from the data can be
used for<br>
> building a filter. Is this true or just old information living in
the document?<br>
> ><br>
> > -Jukka Rahkonen-<br>
> > _______________________________________________<br>
> > mapserver-users mailing list<br>
> > mapserver-users@lists.osgeo.org<br>
> > http://lists.osgeo.org/mailman/listinfo/mapserver-users<br>
> <br>
> _______________________________________________<br>
> mapserver-users mailing list<br>
> mapserver-users@lists.osgeo.org<br>
> http://lists.osgeo.org/mailman/listinfo/mapserver-users<br>
_______________________________________________<br>
mapserver-users mailing list<br>
mapserver-users@lists.osgeo.org<br>
http://lists.osgeo.org/mailman/listinfo/mapserver-users<br>
</font></tt>
<br>
<br>
<br>