[Mapserver-users] qstring - multiple values

Fawcett, David David.Fawcett at state.mn.us
Wed Aug 6 16:10:15 EDT 2003


I figured out the syntax for the expression.  Here is an example that works for me:

The relevant parts of the URL are ...mode=itemnquery&qlayer=basemap&qstring=('[FIPS]'+IN+'27001,27003,27005')


This is an example where I wanted to select records with a value of 27001, 27003, or 27005 in the FIPS field.  (string type field)

You can see that I also was able to omit qitem=FIPS from the URL because it is contained in the expression in the qstring.  (It works with it there too, but I assume that it is ignored)

Thanks for the help Steve!

David.

David Fawcett
MN Office of Environmental Assistance

> ----------
> From: 	Steve Lime[SMTP:steve.lime at dnr.state.mn.us]
> Sent: 	Wednesday, August 06, 2003 10:38 AM
> To: 	matt at kbc.net.au; mapserver-users at lists.gis.umn.edu
> Subject: 	Re: [Mapserver-users] qstring - multiple values
> 
> Remember that qstring is a valid MapServer expression so it's more
> powerful than before, although with that power comes a bit of complexity
> and even cumbersomeness. You're not just limited to string matches. So,
> to do multiple matches you would craft a logical expression like ([item]
> in ('27001','27003',...)). I'm not sure if the in syntax is correct but
> you get the idea. If there is enough interest we could look into
> supporting expressions like:
> 
>   EXPRESSION [27001,27003,...]
> 
> and having MapServer recognize that as a list to be matched against a
> single ITEM. Sort of a shortcut logical expression. It would be
> implemented as a new expression type within the software. Thoughts?
> 
> Steve
> 



More information about the mapserver-users mailing list