Widgets Should be able to do this: |
Should be able to do this:$minValue = 0; $maxValue = 0; $count = 0; $aggregateOptions = new MgFeatureAggregateOptions(); $aggregateOptions->AddComputedProperty(‘min’, ‘Min(‘ . $this->args[‘PROPERTYNAME’] . ‘)’); $aggregateOptions->AddComputedProperty(‘max’, ‘Max(‘ . $this->args[‘PROPERTYNAME’] . ‘)’); $aggregateOptions->AddComputedProperty(‘count’, ‘Count(‘ . $this->args[‘PROPERTYNAME’] . ‘)’); $dataReader = $featureService->SelectAggregate($resId, $layer->GetFeatureClassName(), $aggregateOptions); if ($dataReader->ReadNext()) { $minValue = $this->GetFeaturePropertyValue($dataReader, ‘min’); $maxValue = $this->GetFeaturePropertyValue($dataReader, ‘max’); $count = $this->GetFeaturePropertyValue($dataReader, ‘count’); } $dataReader->Close(); However due to a bug, Min/Max do not work on string types, so we have to do this |