Dan,<br><br>Thank you. That did the trick! Kicking myself! Thank you very much for you prompt and gracious help!<br><br>Steve<br><br><div class="gmail_quote">On Mon, May 2, 2011 at 3:08 PM, Dan Little <span dir="ltr">&lt;<a href="mailto:danlittle@yahoo.com">danlittle@yahoo.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: arial,helvetica,sans-serif; font-size: 10pt;">
<div><span>I suspected you were using a dynamic view.</span></div><div><span><br></span></div><div><span>Add &quot;riding&quot; and &quot;number&quot; to your select statement and you should see things start working.  &quot;number&quot; is a reserved word so you might need to use PostgreSQL to create a view to account for that because you cannot escape &quot;s in MapServer &lt; 6.0.</span></div>
<div><span><br></span></div><div><span>So you might need something like:</span></div><div><span><br></span></div><div><span>create view my_voters_view as </span></div><div><span></span><span style="font-family: &#39;times new roman&#39;,&#39;new york&#39;,times,serif; font-size: 16px;"><span style="white-space: pre-wrap;"><font face="arial, helvetica, sans-serif" size="3"><span style="font-size: 13px;">        </span></font></span>SELECT gid, the_geom, &quot;number&quot; as n_voters, riding as n_riding, vtotal::REAL / vregist::REAL AS percent FROM bc_voting_areas WHERE vregist &gt; 0;</span></div>
<div><span style="font-family: &#39;times new roman&#39;,&#39;new york&#39;,times,serif; font-size: 16px;"><br></span></div><div><span style="font-family: &#39;times new roman&#39;,&#39;new york&#39;,times,serif; font-size: 16px;">That&#39;ll clean up your mapfile a little bit too (visually/readability).</span></div>
<div><span style="font-family: &#39;times new roman&#39;,&#39;new york&#39;,times,serif; font-size: 16px;"><br></span></div><div><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">
<div style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"><div style="font-size: 12pt; font-family: &#39;times new roman&#39;,&#39;new york&#39;,times,serif;"><font face="Arial" size="2"><div class="im"><hr size="1">
<b><span style="font-weight: bold;">From:</span></b> Stephen Knox &lt;<a href="mailto:stephenknox73@gmail.com" target="_blank">stephenknox73@gmail.com</a>&gt;<br></div><b><span style="font-weight: bold;">To:</span></b> Dan Little &lt;<a href="mailto:danlittle@yahoo.com" target="_blank">danlittle@yahoo.com</a>&gt;; <a href="mailto:geomoose-users@lists.sourceforge.net" target="_blank">geomoose-users@lists.sourceforge.net</a><br>
<b><span style="font-weight: bold;">Sent:</span></b> Monday, May 2, 2011 8:56 AM<div><div></div><div class="h5"><br><b><span style="font-weight: bold;">Subject:</span></b> Re: [Geomoose-users] Using Identify with Postgis layer<br>
</div></div></font><div><div></div><div class="h5"><br>
<div>Sorry,<br><br>Never query in haste! I was just using a generic field name, but the below covers everything. It&#39;s just data for playing around with really, from a tutorial.<br><br>Here is the mapfile:<br><br>MAP<br>
  IMAGETYPE      PNG<br>
  EXTENT         0 0 2000000 2000000<br>  SIZE           1000 1000<br>  IMAGECOLOR     255 255 255<br><br>  PROJECTION<br>    &quot;init=epsg:3005&quot;<br>  END <br><br>LAYER<br>CONNECTIONTYPE postgis<br>NAME &quot;voting&quot;<br>

CONNECTION &quot;user=**** password=**** dbname=Unit5 host=localhost&quot;<br>DATA &quot;the_geom from (SELECT gid, the_geom, vtotal::REAL / vregist::REAL AS percent FROM bc_voting_areas WHERE vregist &gt; 0) as foo using srid=3005 using unique gid&quot;<br>

STATUS ON<br>TYPE POLYGON<br>  METADATA<br>  identify_record &quot;identify_voting.html&quot;<br>  END<br>CLASS<br>   COLOR 200 0 0<br>   EXPRESSION ([percent] &gt; 0.7)<br> END<br>CLASS<br>   COLOR 200 200 0<br>   EXPRESSION ([percent] &lt; 0.7)<br>

 END<br><br>END<br><br>END<br><br>The identify_voting.html definition:<br><br>&lt;!-- MapServer Template --&gt;<br>&lt;tr bgcolor=&quot;#DEE5EB&quot;&gt;&lt;td colspan=&quot;2&quot;&gt;&lt;b&gt;&lt;u&gt;Voting Districts&lt;/u&gt;&lt;/b&gt;&lt;/tr&gt;<br>

&lt;tr&gt;<br>&lt;td align=&quot;right&quot;&gt;&lt;b&gt;DistName:&lt;/b&gt;&lt;/td&gt;<br>&lt;td&gt;[riding]&lt;/td&gt;<br>&lt;/tr&gt;<br>&lt;tr&gt;<br>&lt;td align=&quot;right&quot;&gt;&lt;b&gt;Number of Voters:&lt;/b&gt;&lt;/td&gt;<br>

&lt;td&gt;[number]&lt;/td&gt;<br>&lt;/tr&gt;<br>&lt;tr&gt;<br>&lt;td&gt;&amp;nbsp;&lt;/td&gt;<br>&lt;td&gt;&amp;nbsp;&lt;/td&gt;<br>&lt;/tr&gt;<br><br>and the postgis table definition:<br><br>CREATE TABLE bc_voting_areas<br>

(<br>  gid serial NOT NULL,<br>  code character varying(3),<br>  id character varying(8),<br>  riding character varying(29),<br>  region character varying(29),<br>  &quot;number&quot; character varying(4),<br>  ndp numeric(11,0),<br>

  liberal numeric(11,0),<br>  green numeric(11,0),<br>  unity numeric(11,0),<br>  vtotal numeric(11,0),<br>  vreject numeric(11,0),<br>  vregist numeric(11,0),<br>  the_geom geometry,<br>  CONSTRAINT bc_voting_areas_pkey PRIMARY KEY (gid),<br>

  CONSTRAINT enforce_dims_the_geom CHECK (st_ndims(the_geom) = 2),<br>  CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = &#39;MULTIPOLYGON&#39;::text OR the_geom IS NULL),<br>  CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 3005)<br>

)<br>WITH (<br>  OIDS=FALSE<br>);<br>ALTER TABLE bc_voting_areas OWNER TO postgres;<br><br>CREATE INDEX bc_voting_areas_geom_idx<br>  ON bc_voting_areas<br>  USING gist<br>  (the_geom);<br><br>CREATE INDEX bc_voting_areas_the_geom_gist<br>

  ON bc_voting_areas<br>  USING gist<br>  (the_geom);<br><br><br><br><div>On Mon, May 2, 2011 at 1:31 PM, Dan Little <span dir="ltr">&lt;<a rel="nofollow" href="mailto:danlittle@yahoo.com" target="_blank">danlittle@yahoo.com</a>&gt;</span> wrote:<br>

<blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-size: 10pt; font-family: arial,helvetica,sans-serif;">

<div><span>Is &quot;feature_name&quot; a field in your table?</span></div><div><br></div><div>Any chance we can see the definition of the table, the mapfile, and template that you are using?</div><div><br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">

<div style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"><div style="font-size: 12pt;"><font face="Arial" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Stephen Knox &lt;<a rel="nofollow" href="mailto:stephenknox73@gmail.com" target="_blank">stephenknox73@gmail.com</a>&gt;<br>

<b><span style="font-weight: bold;">To:</span></b> <a rel="nofollow" href="mailto:geomoose-users@lists.sourceforge.net" target="_blank">geomoose-users@lists.sourceforge.net</a><br><b><span style="font-weight: bold;">Sent:</span></b> Monday, May 2, 2011 5:57 AM<br>

<b><span style="font-weight: bold;">Subject:</span></b> Re: [Geomoose-users]
 Using Identify with Postgis layer<br></font><div><div><br><div>Hi list,<br><br>I came across GeoMoose through a university project to create a mapping server. I&#39;ve managed to get it working fairly well with Mapserver and PostGIS data (and looking good, thanks!), but I was just wondering whether anyone has used &quot;Identify&quot; with PostGIS layers. I have followed the instructions <a rel="nofollow" href="http://www.geomoose.org/wiki/index.php/Setup_guide#Get_Identify_to_work_-_Make_sure_identify_will_work.when_you_identify_a_feature_any_visible_shape_file_or_WMS_will_display_those_attributes_in_the_table_of_contents." target="_blank">here</a>, but I think these were written for Shapefiles, as I just get the text &quot;[FEATURE_NAME]&quot; in the resulting HTML rather than the actual feature selected name. This is also true if I put &quot;[feature_name from table_name]&quot; as per how fields are defined in the Mapserver DATA field.<br>


<br> Any help much appreciated.<br><br>Thanks<br><br>Steve <br>
</div><br></div></div>------------------------------------------------------------------------------<br>WhatsUp Gold - Download Free Network Management Software<br>The most intuitive, comprehensive, and cost-effective network <br>

management toolset available today.  Delivers lowest initial <br>acquisition cost and overall TCO of any competing solution.<br><a href="http://p.sf.net/sfu/whatsupgold-sd" target="_blank">http://p.sf.net/sfu/whatsupgold-sd</a><br>

_______________________________________________<br>Geomoose-users mailing list<br><a rel="nofollow" href="mailto:Geomoose-users@lists.sourceforge.net" target="_blank">Geomoose-users@lists.sourceforge.net</a><br><a rel="nofollow" href="https://lists.sourceforge.net/lists/listinfo/geomoose-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/geomoose-users</a><br>

<br><br></div></div></blockquote></div></div></div></blockquote></div><br>
</div><br><br></div></div></div></div></blockquote></div></div></div></blockquote></div><br>