AnsweredAssumed Answered

Trouble getting minimum value from FeatureTable

Question asked by larson_devnetinc on Dec 18, 2018
Latest reply on Dec 18, 2018 by larson_devnetinc

Hello all,

 

I am trying to get the minimum value in a table in a FeatureServer. I have tried both the queryStatistics method and using a NetworkRequest object with outStatistics set.

 

For the queryStatistics problem, I am creating a StatisticsQueryParametes object with a StatisticDefinition specifying the field that I want and that the statisticType should be Enums.StatisticTypeMinimum. I connect a function to the queryStatisticsStatusChanged signal and I see when it is chaned to in progress. However, after a bit of time, I get the error: QObject::connect: Cannot queue arguments of type 'std::shared_ptr<QRTImpl::Stati

sticsQueryResultImpl>' (Make sure 'std::shared_ptr<QRTImpl::StatisticsQueryResultImpl>' is registered using qRegisterMetaType().). 

 

When I tried using a NetworkRequest object, I send the message: {f: "json", outStatistics: [{"statisticType":"min","onStatisticField":"myId", "outStatisticFieldName":"MinID"}]}. The response object gives me the error code 400. I know statistics querying is enabled on this table, because if I go to the query page in my web browser I can put in the same json that I'm setting to outStatistics and I get the result with no problem.

 

If anyone knows what I'm doing wrong, the help would be greatly appreciated.

 

Thanks,

Keith

Outcomes