Value list in expression-field

Tim Schaub tim at COMMENSPACE.ORG
Fri Mar 17 10:48:38 EST 2006


 > -----Original Message-----
> From: UMN MapServer Users List 
> [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Dmitri Mizerkin
> Sent: Friday, March 17, 2006 8:09 AM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: [UMN_MAPSERVER-USERS] Value list in expression-field
> 
> Hi all!
> An extract from my mapfile looks like this:
>   LAYER
>     NAME         Sel_Streets
>     DATA         Streets
>     STATUS       OFF
>     TYPE         LINE
> 
>     CLASSITEM    "OBJECTID"
>     class
>       NAME 'Selected streets'
>       expression '%oid%'
>       STYLE
>         COLOR      255 0 0
>       END
>     end
>   END

> What should I change in the expression-line to be able to 
> provide not a single value to filter features by, but a range 
> of values (for example, {12,15,63})?

You should be able to set your oid (or other variable) to a URL encoded
version of this:

(([OBJECTID] == 12) OR ([OBJECTID] == 15) OR ([OBJECTID] == 63))

> Should be something with 'IN'-keyword, but I can't find out, 
> what the right syntax is...

Or maybe there is some easier way - I haven't heard of IN.

Tim

> Thanks in advance!
> Dmitri
> --
> View this message in context: 
> http://www.nabble.com/Value-list-in-expression-field-t1298405.
> html#a3457524
> Sent from the Mapserver - User forum at Nabble.com.
> 



More information about the mapserver-users mailing list