Select to view content in your preferred language

Arcade Expression Editor: FeatureSets are Dropping M-Values

06-03-2022 12:36 PM
Regular Contributor

It appears I have hit a limitation in the Arcade Editor and/or JS API.  When I drill down to the geometry of a feature in a feature set, vertice information only includes x, y information; m-values are dropped.


var alignmentName = $feature["stationing_alignment"];

var sql = "alignment_name = @alignmentName";
var mapLayerName = "N1205410_Alignments_lrs_DEV";
var outFields = ['alignment_id', 'alignment_name'];
var record_dict = null;
console('   >>> Looking up alignment details...');

var fset = FeatureSetByName($map, mapLayerName, outFields);
var records = Filter(fset, sql);
var cnt = count(records);
console('      >>> Number of Records Found: ' + cnt);
if (cnt > 0) {
    for (var f in records) {
        // console (      >>> 'Has M': + Geometry(f).hasM)
        record_dict = f;
        break; // get only the first record
} else {
    console('>>> No Records found for query ' + sql);
var geom = Geometry(record_dict)
>> Looking up alignment details...
      >>> Number of Records Found: 1


Additionally, maybe this is across the board. Hitting the feature drops the measures as well... at least in what is returned.




- Justin Reynolds, PE
0 Kudos
1 Reply
Esri Contributor

Hi @JustinReynolds,

While m-values are not currently returned by the Map Viewer api, runtime will properly evaluate Arcade expressions with m-values, so they should work in Field Maps, even if you can't test them thoroughly in the Map Viewer. There are active discussions on our end around adding support so expression results will be consistent across the platform.


0 Kudos