TransWikia.com

Workflow for data expression in Arcade - generate elements from concatenated fields

Geographic Information Systems Asked by TravisB on May 24, 2021

I am familiar with Arcade for pop-ups and labeling, but new to using it for data expressions in the new AGOL dashboards.

I have dataset and I would like to generate dashboard elements based on the concatenation of two fields.
E.g. Field_1 has a domain with values ‘A’, ‘B’, and ‘C’, and Field_2 has a domain with values ‘1’ and ‘2’. I would like to generate charts and other elements that summarize values ‘A 1’, ‘A 2’, ‘B 1’, ‘B 2’, etc. Due to the nature of the data these fields should remain separate.

Basic concatenation in other aspects of Arcade (pop-ups, labeling, etc), is straightforward:

Concatenate([$feature["Field_1"], $feature["Field_2"]], ' ')

What is the proper workflow for concatenating these fields and summarize for the entire featureset? You call the featureset…

var portal = Portal('https://MyPortal.maps.arcgis.com/');
var itemId = 'itemId';
var layerId = 0;

var fs = FeatureSetByPortalItem(portal, itemId, layerId, ['*'], false);

… and then I’m not sure.

Do you generate a dictionary of potential concatenated values?

It doesn’t seem like you can create a new field and calculate values with a featureset, which is what I would do through a GUI.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP