<br><font size=2 face="sans-serif">Begin with a simple validation until
it works.  Is it working if you set </font>
<br><font size=3>VALIDATION</font>
<br><font size=3>        id '.*'</font>
<br><font size=3>END</font><font size=2 face="sans-serif"><br>
</font>
<br><font size=2 face="sans-serif">If yes then the problem is in your regex.
Make sure that ',' are accepted.</font>
<br><font size=2 face="sans-serif">If not the problem is the FILTER or
the parameter you pass. </font>
<br>
<br><font size=2 face="sans-serif">Also Is your ID an integer or text in
postgis? I think it matters.</font>
<br><font size=3>('%id%')</font><font size=2 face="sans-serif"> this would
send a string to pg. In this case try </font><font size=3>FILTER  "id"
in ('%id%'), otherwise try</font>
<br><font size=3>FILTER  id in (%id%)</font>
<br>
<br><font size=3>It is not an easy task (in my opinion) in mapserv to use
expresion and filter</font>
<br><font size=3>But have a look at this. there are several examples</font>
<br><font size=3>http://mapserver.org/fr/mapfile/expressions.html#string-expressions-that-return-a-logical-value</font>
<br>
<br><font size=3>Also in you MAPFILE set  debug 5 in the MAP block,
and also in your layer block. You will have more info in your mapserver
log.</font>
<br><font size=3>steve</font>
<p>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Dedy Fuadi <sampahe.fb3@gmail.com></b>
</font>
<p><font size=1 face="sans-serif">2014-05-30 12:17</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">A</font></div>
<td><font size=1 face="sans-serif">Steve.Toutant@inspq.qc.ca</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=1 face="sans-serif">mapserver-users@lists.osgeo.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Objet</font></div>
<td><font size=1 face="sans-serif">Re: RE [mapserver-users] Dynamically
extent and layer filter</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br>
<br>
<br><font size=3>This is my mapfile part :</font>
<br><font size=3>VALIDATION</font>
<br><font size=3>'id' '^[0-9]{1}$'</font>
<br><font size=3>END</font>
<br><font size=3>FILTER  (id in ('%id%'))</font>
<br>
<br><font size=3>and as your advice I set URL parameter like &id=1,4,8
but the map is not appears there.</font>
<br>
<br><font size=3>When I opened debug, I found :</font>
<br><font size=3>[Sat May 31 00:10:34 2014].758000 msEvalRegex(): Regular
expression error. String failed expression test.</font>
<br><font size=3>[Sat May 31 00:10:34 2014].758000 loadForm(): Web application
error. Parameter 'id' value fails to validate.</font>
<br><font size=3><br>
</font>
<br><font size=3>On Fri, May 30, 2014 at 11:42 PM, <</font><a href=mailto:Steve.Toutant@inspq.qc.ca target=_blank><font size=3 color=blue><u>Steve.Toutant@inspq.qc.ca</u></font></a><font size=3>>
wrote:</font>
<br><font size=3 face="sans-serif"><br>
In your mapfile you could set FILTER "id in (%ID%)" .</font><font size=3>
</font><font size=3 face="sans-serif"><br>
And in the url pass a string as parameter such as &id=1,4,8</font><font size=3>
</font><font size=3 face="sans-serif"><br>
That would be a simple way</font><font size=3> <br>
</font><font size=3 face="sans-serif"><br>
Please post further question on mapserver list, so others can answer you,
and the answers can help other people later</font><font size=3> </font><font size=3 face="sans-serif"><br>
thanks</font><font size=3> </font><font size=3 face="sans-serif"><br>
steve</font>
<p><font size=3><br>
<br>
</font>
<p>
<table width=100%>
<tr valign=top>
<td width=42%><font size=1 face="sans-serif"><b>Dedy Fuadi <</b></font><a href=mailto:sampahe.fb3@gmail.com target=_blank><font size=1 color=blue face="sans-serif"><b><u>sampahe.fb3@gmail.com</u></b></font></a><font size=1 face="sans-serif"><b>></b>
</font>
<p><font size=1 face="sans-serif">2014-05-30 11:28</font><font size=3>
</font>
<td width=57%>
<br>
<table width=100%>
<tr valign=top>
<td width=8%>
<div align=right><font size=1 face="sans-serif">A</font></div>
<td width=91%><a href=mailto:Steve.Toutant@inspq.qc.ca target=_blank><font size=1 color=blue face="sans-serif"><u>Steve.Toutant@inspq.qc.ca</u></font></a><font size=3>
</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Objet</font></div>
<td><font size=1 face="sans-serif">Re: RE [mapserver-users] Dynamically
extent and layer filter</font></table>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=50%>
<td width=50%></table>
<br></table>
<br><font size=3><br>
<br>
<br>
<br>
<br>
Hi Steve, <br>
<br>
Your advice is nicely work for me! :D <br>
<br>
But how to select more than one data from postgis by VALIDATION block?
For example, I have a postgis table that have 20 data, then I wanto to
select data 1,4,8, or else to display by customizing URL parameter. I set
'%id%' as my variable at mapfile, I just can display one data like &id=1.
<br>
<br>
Please for your help. <br>
Thank you. <br>
<br>
<br>
On Fri, May 30, 2014 at 8:30 PM, <</font><a href=mailto:Steve.Toutant@inspq.qc.ca target=_blank><font size=3 color=blue><u>Steve.Toutant@inspq.qc.ca</u></font></a><font size=3>>
wrote: </font><font size=3 face="sans-serif"><br>
<br>
Hi</font><font size=3> </font><font size=3 face="sans-serif"><br>
What did you try and what happened? Something in the mapserver log.</font><font size=3>
</font><font size=3 face="sans-serif"><br>
If I understand well you want to use run time substitution, if so here
a link</font><font size=3> </font><font size=3 color=blue><u><br>
</u></font><a href=http://mapserver.org/cgi/runsub.html target=_blank><font size=3 color=blue face="sans-serif"><u>http://mapserver.org/cgi/runsub.html</u></font></a><font size=3>
</font><font size=3 face="sans-serif"><br>
<br>
Make sure you have a VALIDATION block</font><font size=3> </font><font size=3 face="sans-serif"><br>
Steve</font><font size=3> <br>
<br>
</font>
<p>
<table width=100%>
<tr valign=top>
<td width=53%><font size=1 face="sans-serif"><b>Dedy Fuadi <</b></font><a href=mailto:sampahe.fb3@gmail.com target=_blank><font size=1 color=blue face="sans-serif"><b><u>sampahe.fb3@gmail.com</u></b></font></a><font size=1 face="sans-serif"><b>>@</b></font><a href=http://lists.osgeo.org/ target=_blank><font size=1 color=blue face="sans-serif"><b><u>lists.osgeo.org</u></b></font></a><font size=1 face="sans-serif">
<br>
Envoyé par : </font><a href="mailto:mapserver-users-bounces@lists.osgeo.org" target=_blank><font size=1 color=blue face="sans-serif"><u>mapserver-users-bounces@lists.osgeo.org</u></font></a><font size=3>
</font>
<p><font size=1 face="sans-serif">2014-05-30 06:52</font><font size=3>
</font>
<td width=46%>
<br>
<table width=100%>
<tr valign=top>
<td width=10%>
<div align=right><font size=1 face="sans-serif">A</font></div>
<td width=89%><a href="mailto:mapserver-users@lists.osgeo.org" target=_blank><font size=1 color=blue face="sans-serif"><u>mapserver-users@lists.osgeo.org</u></font></a><font size=3>
</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Objet</font></div>
<td><font size=1 face="sans-serif">[mapserver-users] Dynamically extent
and layer filter</font></table>
<br><font size=3><br>
</font>
<br>
<table width=100%>
<tr valign=top>
<td width=50%>
<td width=50%></table>
<br></table>
<br><font size=3><br>
<br>
<br>
<br>
<br>
<br>
Hello friends, <br>
<br>
I just success applying filter data for postgis database on my mapfile,
but I met problem when I was to try use dynamic variable for filter data
and extent map like variable at php file. <br>
<br>
What should I do for solving this problem? Whether mapfile can be a dynamically
file like php? <br>
<br>
Thank you, <br>
regards.</font><tt><font size=3>_______________________________________________<br>
mapserver-users mailing list</font></tt><font size=3 color=blue><u><br>
</u></font><a href="mailto:mapserver-users@lists.osgeo.org" target=_blank><tt><font size=3 color=blue><u>mapserver-users@lists.osgeo.org</u></font></tt></a><font size=3 color=blue><u><br>
</u></font><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target=_blank><tt><font size=3 color=blue><u>http://lists.osgeo.org/mailman/listinfo/mapserver-users</u></font></tt></a><font size=3>
<br>
<br>
<br>
<br>
<br>
</font>
<p>
<br>
<br>
<br>