[mapserver-users] variable substitution

thomas bonfort thomas.bonfort at gmail.com
Wed Jan 4 03:34:51 PST 2017


If you're using mapserver, your syntax and the docs probably need to be
updated. Try:

FILTER ( "[gid]" = "[%adrkey%]" )

please submit a PR to the docs if that solved the issue.
--
thomas


On Wed, Jan 4, 2017 at 12:27 PM Jörg Thomsen (WhereGroup) <
joerg.thomsen at wheregroup.com> wrote:

> Hello and a happy new year!
>
> I have had some problems with variable subst. and the FILTER keyword,
> following the example from http://mapserver.org/cgi/runsub.html#filters
> I first tried
>
> >       VALIDATION
> >               'adrkey' '[0-9]'
> >       END
> >
> >       FILTER ('gid=%adrkey%')
>
> but this doesn't work, mapserver seems not to put the filteritem into
> the sql-request:
> > [Wed Jan  4 11:36:24 2017].762361 msPostGISLayerWhichShapes(): Error
> (ERROR:  syntax error at or near "="
> > LINE 1: ...019,333328.511788558 5808847.26502019))',25833) and ( = '1')
>
> then I had a look at expression-page
> (http://mapserver.org/mapfile/expressions.html) and tried
>
> >     FILTERITEM 'gid'
> >     FILTER '%adrkey%'
> which works.
>
> is there any mistake in my first try or doesn't this work anymore an the
> doc on http://mapserver.org/cgi/runsub.html#filters  should be updated?
>
> Regards, Jörg
>
> --
>
> *********************************************************
> FOSS Academy Winterschule 2017
> 20.-24.03.2017 in Bonn
> Alles Wichtige zur Erstellung einer GDI in nur 5 Tagen!
> https://www.foss-academy.com/schulungstermine/kompaktkurs-winterschule
> *********************************************************
>
> -------------------------------
> Jörg Thomsen
> WhereGroup GmbH & Co. KG
> Gillweg 3
> 14193 Berlin
> Germany
>
> Fon: +49 (0)30 / 5130 278 74 <+49%2030%20513027874>
> Fax: +49 (0)30 / 89 09 53 21 <+49%2030%2089095321>
>
> joerg.thomsen at wheregroup.com
> www.wheregroup.com
> Amtsgericht Bonn, HRA 6788
> -------------------------------
> Komplementärin:
> WhereGroup Verwaltungs GmbH
> vertreten durch:
> Olaf Knopp, Peter Stamm
> -------------------------------
> Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20170104/dfb0f63e/attachment.html>


More information about the mapserver-users mailing list