<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:10pt"><DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Thanks Kenneth,</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">I'm looking for sample code of making data filter programmatically and save in into current session.</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Regards,</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Ary Sucaya<BR><BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: "Kenneth, GEOGRAF A/S" &lt;ks@geograf.dk&gt;<BR>To: MapGuide Users Mail List &lt;mapguide-users@lists.osgeo.org&gt;<BR>Sent: Wednesday, January 2, 2008 10:08:48 AM<BR>Subject: Re: [mapguide-users] Sql For Data Filter<BR><BR>I think the "Query" part of the "Generic Tasks" is close to what you want:<BR><A class=moz-txt-link-freetext href="http://data.mapguide.com/mapguide/gt/index.php" target=_blank rel=nofollow>http://data.mapguide.com/mapguide/gt/index.php</A><BR><BR>More samples:<BR><A class=moz-txt-link-freetext href="http://mapguide.osgeo.org/livegallery.html" target=_blank rel=nofollow>http://mapguide.osgeo.org/livegallery.html</A><BR><PRE class=moz-signature>Regards, Kenneth, GEOGRAF A/S
</PRE><BR><BR>ary sucaya skrev: 
<BLOCKQUOTE type="cite">
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Great!, I will try</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">I was wondering if there is a sample code for it..<BR>Thank v much..</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">regards,</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Ary Sucaya</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"><BR>&nbsp;</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: "Kenneth, GEOGRAF A/S" <A class=moz-txt-link-rfc2396E href="mailto:ks@geograf.dk" target=_blank rel=nofollow ymailto="mailto:ks@geograf.dk">&lt;ks@geograf.dk&gt;</A><BR>To: MapGuide Users Mail List <A class=moz-txt-link-rfc2396E href="mailto:mapguide-users@lists.osgeo.org" target=_blank rel=nofollow ymailto="mailto:mapguide-users@lists.osgeo.org">&lt;mapguide-users@lists.osgeo.org&gt;</A><BR>Sent: Wednesday, January 2, 2008 8:46:05 AM<BR>Subject: Re: [mapguide-users] Sql For Data Filter<BR><BR>I don't have a list of what the different providers support.<BR>I have used the OGR provider, and it supports PostGIS and limited SQL.<BR><BR>My approach to your problem would be to start out with the layer hidden.<BR>When you want to display the correct district, you read out the WKT of the feature (district) you want to perform the intersection
 test with.<BR>Then you update the filter on the layer to reflect this:<BR>GeoColumn Intersects GEOMFROMTEXT('....wkt....')<BR>Then show the layer.<BR><BR>You should copy the layer into the session repository before altering it.<BR>If you want to theme it, you can create multiple copies of the layer and apply theming to the individual layers.<BR><PRE class=moz-signature>Regards, Kenneth, GEOGRAF A/S
  </PRE><BR><BR>ary sucaya skrev: 
<BLOCKQUOTE type="cite">
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Thank for your reply,</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Can you pls inform me what provider support full sql syntax? I use postgis and it seem to be not support full sql syntax.</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">In my case, i can't use join tables because i need spatial relationship between 2 tables. For examples in Mapguide sample there are 11 districts. At first time, i want to hide parcels. Then i&nbsp;want to make&nbsp;a query to show parcels in particular distric and i want maps show parcels which are in that query result. In this case, join between two tables may not help me. I make use spatial relationship such as intersects or within in this case.<BR></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Regards,</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Ary Sucaya</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"><BR>&nbsp;</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: "Kenneth, GEOGRAF A/S" <A class=moz-txt-link-rfc2396E href="mailto:ks@geograf.dk" target=_blank rel=nofollow ymailto="mailto:ks@geograf.dk">&lt;ks@geograf.dk&gt;</A><BR>To: MapGuide Users Mail List <A class=moz-txt-link-rfc2396E href="mailto:mapguide-users@lists.osgeo.org" target=_blank rel=nofollow ymailto="mailto:mapguide-users@lists.osgeo.org">&lt;mapguide-users@lists.osgeo.org&gt;</A><BR>Sent: Tuesday, January 1, 2008 5:25:05 PM<BR>Subject: Re: [mapguide-users] Sql For Data Filter<BR><BR>That depends on the provider. Some providers supports full SQL syntax.<BR><BR>I can't see how you can join tables with a filter, as that is the equvalent of the SQL WHERE construct.<BR>You can try to setup a Join on the featuresource, but I have had limited success with joins.<BR><PRE class=moz-signature>Regards, Kenneth, GEOGRAF A/S
  </PRE><BR><BR>ary sucaya skrev: 
<BLOCKQUOTE type="cite">
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">
<DIV>Hello,</DIV>
<DIV>&nbsp;</DIV>
<DIV>I was wondering if i can put a complex sql statement at 'Filter applied to data' textbox on Layer Editor. I need to show some data from my postgis table and sql to select this data involving 2 or more table.</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Regs,</DIV>
<DIV>&nbsp;</DIV>
<DIV>ary sucaya</DIV></DIV><BR>
<HR SIZE=1>
Never miss a thing. <A href="http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs" target=_blank rel=nofollow>Make Yahoo your homepage.</A> <PRE><HR width="90%" SIZE=4>
_______________________________________________
mapguide-users mailing list
<A class=moz-txt-link-abbreviated href="mailto:mapguide-users@lists.osgeo.org" target=_blank rel=nofollow ymailto="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</A>
<A class=moz-txt-link-freetext href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" target=_blank rel=nofollow>http://lists.osgeo.org/mailman/listinfo/mapguide-users</A>
  </PRE></BLOCKQUOTE></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"><BR></DIV></DIV><BR>
<HR SIZE=1>
Looking for last minute shopping deals? <A href="http://us.rd.yahoo.com/evt=51734/*http://tools.search.yahoo.com/newsearch/category.php?category=shopping" target=_blank rel=nofollow>Find them fast with Yahoo! Search.</A> <PRE><HR width="90%" SIZE=4>
_______________________________________________
mapguide-users mailing list
<A class=moz-txt-link-abbreviated href="mailto:mapguide-users@lists.osgeo.org" target=_blank rel=nofollow ymailto="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</A>
<A class=moz-txt-link-freetext href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" target=_blank rel=nofollow>http://lists.osgeo.org/mailman/listinfo/mapguide-users</A>
  </PRE></BLOCKQUOTE></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"><BR></DIV></DIV><BR>
<HR SIZE=1>
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. <A href="http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ%20" target=_blank rel=nofollow>Try it now.</A> <PRE><HR width="90%" SIZE=4>
_______________________________________________
mapguide-users mailing list
<A class=moz-txt-link-abbreviated href="mailto:mapguide-users@lists.osgeo.org" target=_blank rel=nofollow ymailto="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</A>
<A class=moz-txt-link-freetext href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" target=_blank rel=nofollow>http://lists.osgeo.org/mailman/listinfo/mapguide-users</A>
  </PRE></BLOCKQUOTE></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"><BR></DIV></div><br>

      <hr size=1>Never miss a thing.  <a href="http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs"> Make Yahoo your homepage.</a>

</body></html>