@pulldata Query (Feature Service/Layer)

143
2
03-14-2024 07:32 AM
GaryBowles1
Occasional Contributor III

I am trying to query a feature service using @pulldata in the calculate field. I am receiving the following error:

...:Couldn\'t understand the expression starting at this point: ...tStatistics=[{"\xcd\x8estatisticType":...

Here is the pulldata request:

pulldata("@layer", "getValue", "attributes.field1", "https://gis.srcx.com/server/rest/services/APPS/APPS_RUN_LOG_BINGHAM_MR/FeatureServer?outStatistics=[{"statisticType": "avg","onStatisticField": "field1","outStatisticFieldName": "field1_avg"}])

The feature service is the same one that the Survey points to.

Survey123 Connect 3.19

ArcGIS Enterprise 11.1

Thanks,

--gary

0 Kudos
2 Replies
ZacharySutherby
Esri Regular Contributor

Hello @GaryBowles1

The quotation marks in your outStatistics string is throwing off the URL string. 

pulldata("@layer", "getValue", "attributes.field1", "https://gis.srcx.com/server/rest/services/APPS/APPS_RUN_LOG_BINGHAM_MR/FeatureServer?outStatistics=[{"statisticType": "avg","onStatisticField": "field1","outStatisticFieldName": "field1_avg"}])

You'll need to use something like: 

pulldata("@layer", "getValue", "attributes.field1", 'https://gis.srcx.com/server/rest/services/APPS/APPS_RUN_LOG_BINGHAM_MR/FeatureServer?outStatistics=[{"statisticType": "avg","onStatisticField": "field1","outStatisticFieldName": "field1_avg"}]')

 

Thank you,
Zach
0 Kudos
GaryBowles1
Occasional Contributor III

Thanks Zach I will give it a try and let you know what happens.

--gary

0 Kudos