One way to do it is to pass new parameters(with tha exact name of you&#39;re mapfile variable) in the GetFeatureInfo URL so it would look something like this:<div><br></div><div><font size="2" face="sans-serif">Here is the request</font><font size="3"> </font><font size="2" face="sans-serif">GetFeatureInfo<br>
/cgi-bin/mapserv.exe?map=MYMAP service=WMS&amp;version=1.1.0&amp;request=GetFeatureInfo&amp;layers=ecoles&amp;query_layers=ecoles&amp;styles=&amp;bbox=-8820221.560815%2C5721770.182129%2C-7587445.168853%2C6361395.234705&amp;srs=EPSG%3A900913&amp;feature_count=3000&amp;x=272&amp;y=457&amp;height=523&amp;width=1008&amp;info_format=text%2Fhtml<b>&amp;</b></font><span class="Apple-style-span" style="font-family: sans-serif; "><b>SEMCDC=&lt;value&gt;&amp;</b></span><span class="Apple-style-span" style="font-family: sans-serif; "><b>RSS=</b></span><span class="Apple-style-span" style="font-family: sans-serif; "><b>&lt;value&gt;&amp;</b></span><span class="Apple-style-span" style="font-family: sans-serif; "><b>ORDRE</b></span><span class="Apple-style-span" style="font-family: sans-serif; "><b>&lt;value&gt;</b></span><br>
<br></div><div>MapServer will then replace the value before returning the result.</div><div><br></div><div>hope&#39;s this help....</div><div><br></div><div>MartinO</div><div><br><div class="gmail_quote">2009/11/23  <span dir="ltr">&lt;<a href="mailto:Steve.Toutant@inspq.qc.ca">Steve.Toutant@inspq.qc.ca</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br><font size="2" face="sans-serif">Hi,</font><font size="3"> </font>
<br><font size="2" face="sans-serif">I already posted this problem on openlayers
list, but it might be a mapserver issue.</font>
<br>
<br><font size="2" face="sans-serif">OpenLayers.Control.WMSGetFeatureInfo
doesn&#39;t use the FILTER key in my mapfile. This filter is define with variables
like this:</font>
<br><font size="2" face="sans-serif">FILTER &quot;semcdc in (%SEMCDC%) and
rss in (%RSS%) and ordre in (%ORDRE%)&quot;</font><font size="3"> </font><font size="2" face="sans-serif">.
</font>
<br>
<br><font size="2" face="sans-serif">The getMap request is succesfull but
not the GetFeatureInfo request<br>
<br>
Here is the request</font><font size="3"> </font><font size="2" face="sans-serif">GetFeatureInfo<br>
/cgi-bin/mapserv.exe?map=MYMAP service=WMS&amp;version=1.1.0&amp;request=GetFeatureInfo&amp;layers=ecoles&amp;query_layers=ecoles&amp;styles=&amp;bbox=-8820221.560815%2C5721770.182129%2C-7587445.168853%2C6361395.234705&amp;srs=EPSG%3A900913&amp;feature_count=3000&amp;x=272&amp;y=457&amp;height=523&amp;width=1008&amp;info_format=text%2Fhtml</font><font size="3">
<br>
</font><font size="2" face="sans-serif"><br>
Here is the response</font><font size="3"> </font><font size="2" face="sans-serif"><br>
&lt;?xml version=&#39;1.0&#39; encoding=&quot;ISO-8859-1&quot; standalone=&quot;no&quot;
?&gt;</font><font size="3"> </font><font size="2" face="sans-serif"><br>
&lt;!DOCTYPE ServiceExceptionReport SYSTEM &quot;<a href="http://schemas.opengis.net/wms/1.1.0/exception_1_1_0.dtd" target="_blank">http://schemas.opengis.net/wms/1.1.0/exception_1_1_0.dtd</a>&quot;&gt;</font><font size="3">
</font><font size="2" face="sans-serif"><br>
&lt;ServiceExceptionReport version=&quot;1.1.0&quot;&gt;</font><font size="3">
</font><font size="2" face="sans-serif"><br>
&lt;ServiceException&gt;</font><font size="3"> </font><font size="2" face="sans-serif"><br>
prepare_database(): Query error. Error declaring cursor: ERROR:  syntax
error at or near &amp;quot;%&amp;quot;</font><font size="3"> </font><font size="2" face="sans-serif"><br>
LINE 1: ...:text from ecoles WHERE (semcdc in (%SEMCDC%) ...</font><font size="3">
</font><font size="2" face="sans-serif"><br>
                    
                     
                  ^</font><font size="3">
</font><font size="2" face="sans-serif"><br>
With query string: DECLARE mycursor BINARY CURSOR FOR SELECT &amp;quot;taux_abs&amp;quot;::text,&amp;quot;nouv&amp;quot;::text,asbinary(force_collection(force_2d(geom900913)),&amp;#39;NDR&amp;#39;),id::text
from ecoles WHERE (semcdc in (%SEMCDC%) and rss in (%RSS%) and ordre in
(%ORDRE%)) and (geom900913 &amp;amp;&amp;amp; setSRID( &amp;#39;BOX3D(-8493071.07981319
5795761.22549582,-8480841.15528974 5807991.15001926)&amp;#39;::BOX3D,900913)
)</font><font size="3"> <br>
</font><font size="2" face="sans-serif"><br>
&lt;/ServiceException&gt;</font><font size="3"> </font><font size="2" face="sans-serif"><br>
&lt;/ServiceExceptionReport&gt;</font><font size="3"> <br>
<br>
</font><font size="2" face="sans-serif">In OL, I have a WMS layer define
like this:</font><font size="3"> </font><font size="2" face="sans-serif"><br>
new OpenLayers.Layer.WMS(&#39;ecoles&#39;, &#39;.../cgi-bin/mapserv.exe?map=MYMAP&#39;,{layers:
&#39;ecoles&#39;, transparent: &quot;true&quot;, format:&quot;image/gif&quot;,
SEMCDC:thisCDC, RSS: thisRSS, ORDRE: thisOrdre},{isBaseLayer: false, visibility:
false,singleTile:true,transitionEffect: &#39;resize&#39;});</font><font size="3">
<br>
</font><font size="2" face="sans-serif"><br>
How should I query the layer?</font><font size="3"> </font><font size="2" face="sans-serif"><br>
Thanks</font><font size="3"> </font><font size="2" face="sans-serif"><br>
Steve</font><font size="3"> </font><font size="2" face="sans-serif"><br>
</font><font size="3" color="#0066ff"><i><br>
Steve Toutant, M. Sc.</i></font><font size="3"><br>
Analyste en géomatique<br>
Secteur environnement<br>
Direction de la santé environnementale et de la toxicologie<br>
Institut national de santé publique du Québec<br>
945, avenue Wolfe<br>
Québec, Qc G1V 5B3 </font>
<p><font size="3">Tél.: (418) 650-5115 #5281<br>
Fax.: (418) 654-3144</font><font size="3" color="blue"><u><br>
</u></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" color="blue"><u><br>
</u></font><a href="http://www.inspq.qc.ca/" target="_blank"><font size="3" color="blue"><u>http://www.inspq.qc.ca</u></font></a><font size="3">
</font>
<br>
<br></p><br>_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
<br></blockquote></div><br></div>