[mapguide-users] Missing "IN" Operator For Layer Filters

Rock Beans rockbeans at gmail.com
Fri Jul 13 15:01:00 EDT 2007


Using the 1.1 Web API documentation it seems the IN statement should work.
The only thing I noticed was possible spaces before and after the ( ). Who
knows maybe this is also broke in 1.2 RC2 as a result of the SDF changes.
Can anyone confirm?

http://mapguide.osgeo.org/files/mapguide/docs/webapi/index.html

http://mapguide.osgeo.org/files/mapguide/docs/webapi/da/ddd/group___filters_and_expressions.html


<Identifier> IN ( <ValueExpressionCollection> )

anInt16 is an Int16 property. In one feature instance the value of anInt16
is -7033. If you apply <filter>anInt16 IN ( -5995, -7033 ), you select this
feature.

<?php
$queryOptions->AddFeatureProperty("anInt16");
$queryOptions->SetFilter("anInt16 IN ( -5995, -7033 )");
$featureService->SelectFeatures($featureSrcResourceId, $featClassName,
$queryOptions);
?>
sqlplus> select anInt16 from featclass where anInt16 in ( -5995, -7033 );

The Rock



On 7/13/07, James Card <James.Card at calcad.com> wrote:
>
> There is apparently no "IN" operator for layer filter expressions that
> would allow me to select a list of objects like "FID IN (37,53,249,1391)".
> It looks like the only option is a series of "OR" statements: "FID=37 OR
> FID=53 OR FID=249 OR FID=1391". Have I overlooked something somewhere? Is
> there a better way of doing this?
>
> --
> James Card
> 209-578-5580
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20070713/1dd970ec/attachment.html


More information about the mapguide-users mailing list