Select to view content in your preferred language

Arcade - add function to grab layer name and id

1203
3
02-04-2021 07:34 AM
Status: Open
NiekGoorman1
Regular Contributor

For popup expressions it would be really useful to be able to get the layer name and ID for a feature. I'm just starting to use Arcade and am trying to create dynamic URLs based on feature ID, for which I also need the layer ID, only to find that Arcade does not support this. It does allow extracting a featureset, which even displays the name or ID, but there is no way to dynamically extract this.

3 Comments
jcarlson

It'd probably require the creation of a new type, akin to the "Portal" type, but I agree that it would be very useful to be able to grab the URL or ID via Arcade.

berniejconnors

Yes,  it would be really useful to be able to get the layer name and ID for a feature.  If you have these two items it would be really easy to create a URL to download that single feature as a KMZ file or JSON string and present the URL in the pop-up window.

cat206
by

I think this is now available using the GetFeatureSetInfo : FeatureSet functions | ArcGIS Arcade | Esri Developer

Hopefully this helps