[mapserver-users] A problem with the Run-time substitution

Burgholzer, Robert (DEQ) Robert.Burgholzer at deq.virginia.gov
Mon Nov 7 06:18:19 PST 2016


By includiong the single quotes in the PROCESING directive, doesn't that make your input evaluated as a string?  You example suggests that mapserver considers single quotes around the input to be bad and rejects it - but by putting single quotes in PROCESSING it should avoid that.

What does the expression look like when you tried to syntax I suggested?

-----Original Message-----
From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Janne Tuovinen
Sent: Monday, November 07, 2016 9:08 AM
To: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] A problem with the Run-time substitution

Thank you, but this doesn't work for me. The problem is that I want to pass a string value to my database, but the MapServer doesn't allow that and always passes the parameters value as an integer.

-Janne


11/7/2016, 3:33 PM, Burgholzer, Robert (DEQ) wrote:
> I believe that what you want is this:
>
>       PROCESSING "NATIVE_FILTER=param in '%param%' "
>
> I have not used the processing directive, so can not be sure, but the above syntax would work in a QUERY.
>
>
> -----Original Message-----
> From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] 
> On Behalf Of Janne Tuovinen
> Sent: Monday, November 07, 2016 7:36 AM
> To: mapserver-users at lists.osgeo.org
> Subject: [mapserver-users] A problem with the Run-time substitution
>
> Hi,
>
> I have a problem when I'm trying to pass a url-parameter to Postgis query's NATIVE_FILTER in my map file.
>
> My layer looks something like this:
>
>   LAYER
>      ...
>       VALIDATION
>           'param' '.+'
>       END
>       ...
>       DATA "shape from table"
>       PROCESSING "NATIVE_FILTER=param in %param%"
>
>    END # LAYER
>
> Here is some examples what I get when I try to pass some values: 
>
> ...&param=1000   = > (param in (1000))
> ...&param='1000' = > (param in (%param%))
>
> What I like to have is: (param in ('1000'))
>
> Is there a way to this with the MapServer 7.0?
>
> Thank you,
> Janne
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users


_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


More information about the mapserver-users mailing list