Ah ok I was looking at the mapfile. Passing &YEAR=1976 in from the command line 
should work fine.
Maybe the value is being treated as a string, so you could test if the 
following worked (equals rather than less than):

EXPRESSION ("[year]" = "%year%")

Also maybe try with a different parameter name e.g. MYYEAR just in case YEAR is 
treated differently as it is used for various OGC services. 

Seth

--
web:https://geographika.net
twitter: @geographika


On Sun, Feb 6, 2022, at 9:50 AM, andy wrote:
> Hi Seth,
> 
> On Sun, 6 Feb 2022 at 09:35, Seth G <se...@geographika.co.uk> wrote:
>  
>> Shouldn't the variable be wrapped in percentage signs?
>> 
>> EXPRESSION (%year% < 1976)
> 
> my goal is another one. My hardcorded expression is "EXPRESSION ([year] < 
> 1976)".
> 
> I want to use run-time substitution to use "EXPRESSION ([year] < '%year%')", 
> in the same way described here:
> https://mapserver.org/el/mapfile/validation.html#test-with-commandline
> 
> Thank you
>  
> -- 
> ___________________
> 
> Andrea Borruso
> website: https://medium.com/tantotanto
> 38° 7' 48" N, 13° 21' 9" E, EPSG:4326
> ___________________
> 
> "cercare e saper riconoscere chi e cosa,
>  in mezzo all’inferno, non è inferno, 
> e farlo durare, e dargli spazio"
> 
> Italo Calvino
_______________________________________________
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to