[Mapserver-users] ms 3.6.3 itemnquery: need FILTER expression for *multiple* values
George Planansky
george_planansky at harvard.edu
Tue Jan 21 00:46:32 PST 2003
With mapserver 3.6.3 using itemnquery , how do you set
the FILTER expression to return multiple selected items?
I can only get it to select the first match.
Using the test suite itemquery/case4 example,
LAYER
NAME county
DATA county
STATUS DEFAULT
TYPE POLYGON
FILTER "%value%" # only gets first match of dynamic value list
#FILTER /Aitkin|Anoka/ # shows that filter can get multiple static values
FILTERITEM CTY_NAME
CLASS
COLOR 212 212 212
OUTLINECOLOR 0 0 0
TEMPLATE case4_template.html
END
END
from test.html
<form method="get" action="/cgi-bin/mapserv">
<input type="hidden" name="map"
\value="/usr/local/www/docs/mapserver_demos/tests/itemquery/case4.map">
<input type="hidden" name="mode" value="itemnquery">
<input type="hidden" name="qlayer" value="county">
<input type="hidden" name="item" value="cty_name">
Select one or more: <br>
<select name="value" size="5" MULTIPLE>
<option> Aitkin
<option> Anoka
...
<option> Yellow Medicine
</select>
<p>
<input type="submit" value="Go!">
</form>
Selecting Becker and Beltrami from the above test.html
produces a GET with both Becker and Beltrami values:
"GET
/cgi-bin/mapserv?\
map=%2Fusr%2Flocal%2Fwww%2Fdocs%2Fmapserver_demos%2Ftests%2Fitemquery%2Fcase4.map\
&mode=itemnquery\
&qlayer=county\
&item=cty_name\
&value=Becker\
&value=Beltrami\
HTTP/1.0" 200 1404
But using
FILTER %value%
only selects the first value "Becker".
How do you get it to use all the selected values ??
thanks
More information about the MapServer-users
mailing list