Select to view content in your preferred language

Get m-value from pulldata

262
1
3 weeks ago
Rayn
by
Emerging Contributor

Hi All,

Is there support for getting an m-value using the pulldata function on an existing feature service?

Currently i have a survey set up with a geopoint question and i am pulling data from a roads file to get the road information (road name, etc.).  I would really like to get the milepost of the measured road line in the survey since that is used in the requested report.    

Tags (2)
0 Kudos
1 Reply
DeonLengton
Esri Regular Contributor

 Try this:

pulldata("@layer", "getValue","geometry", "https://services.arcgis.com/<itemid>/ArcGIS/rest/services/LayerName/FeatureServer/0?returnM=true", "1=1")

You will then need to parse the m-values out of the return geometry string

e.g

{"hasM":true,"paths":[[[28.5962861994366,-26.7577827794361,2],[28.9478486986999,-26.6899854979254,3],[29.2474755858004,-26.8433642898105,1],[29.3673267430858,-27.1388337285969,4]]]}

pulldata("@json", ${pull1}, "paths[0][0][2]") to get the first m-value

0 Kudos