Questions tagged [arcade]

Use for questions about Arcade expression language used across ArcGIS Platform

Filter by
Sorted by
Tagged with
0 votes
0 answers
9 views

Arcade Expression: Use FeatureSetBy ID Data from layer within Map Service

I'm new to Arcade expressions. I want to harvest an ID from one of the layers in a secure map service in order to populate a field in an editable layer in a Field Maps map. Is it possible to use ...
user avatar
0 votes
0 answers
12 views

Contingent values in ArcGIS Online - Need to update domain value in field based on another field value

I am trying to build a very simple calculation (or so I believe it should be) in Field Maps. I want the field, we'll call it "Calculations", to populate either "Compliant" or "...
user avatar
2 votes
1 answer
60 views

Using the Arcade Split function to create a list element in ArcGIS Dashboard

I am making a dashboard in ArcGIS Online. (see figure) I want to create a list for users to select their biomass of interest and use them as a filter for the diagrams on the right. The current names ...
user avatar
  • 385
1 vote
1 answer
34 views

How to remove null attributes with table row from popup using Arcade expression in ArcGIS Portal

I am using the HTML code to configure the popup <font size="2"> <table border="1"> <tbody> <tr> <td><b><font color="#000000">...
user avatar
1 vote
0 answers
11 views

How to autocomplete from dropdown menu in Arcade?

I have an ArcGIS Online App where a user is expected to enter an input into one of the fields. This field has a dropdown/domain list with more than 2000 predefined values. I would like to implement an ...
user avatar
  • 65
1 vote
1 answer
37 views

Round and truncate numeric label in ArcGIS Pro

I have a numeric field that I'd like to use as a label in ArcGIS Pro, but would only like to show the first two digits of that field. For example, The value in the table is "7,903,043" but I ...
user avatar
1 vote
1 answer
40 views

ArcGIS Pro Attribute Rule to pass a value from child to parent

I have an ArcGIS geodatabase with a parent feature class related to a child stand alone table containing the various inspections made on each parent feature. Primary key is GlobalID and foreign key is ...
user avatar
  • 31
0 votes
0 answers
29 views

Writing ArcGIS Online symbology expression using if else

Can you help me with the if else syntax for an online symbology expression in ArcGIS Online? My code is if ($feature.kayam<= 0 < 10 ){ return "rgb(103, 0, 31)"; } else if ($...
user avatar
0 votes
0 answers
36 views

ArcGIS Field Calculator: Sequential Numbers [duplicate]

I am attempting to populate a field with sequential numbers using Python or arcade but need to duplicate the sequential number created if values match in Field A. The below snippet obviously creates ...
user avatar
0 votes
1 answer
26 views

How to generate superscript with Arcade derived labels

I would like to label features with superscript mi2 in AGOL map viewer. I've tried setting the label as var label = " mi" + "<SUP>" + "2" + "</SUP>" ...
user avatar
  • 409
0 votes
1 answer
55 views

Accessing value in specific field of FeatureSet using Arcade

I am working on an ArcGIS Online app, where I need to evaluate the value in a specific field of a selected feature. I want to do something like this: var myFeature = FeatureSetByName($selection, "...
user avatar
  • 65
0 votes
0 answers
16 views

Match Symbology Layer to Style using match values, multiple fields in ArcGIS Pro

I'm wondering if anyone has had luck in using Arcade to match symbology from a style file to multiple value fields? For example, I have attributes that are styled based on two fields. The compound ...
user avatar
  • 1
0 votes
1 answer
31 views

Pop-Up with Arcade Expression Shows Incorrect Values in Field Maps

I have run into an issue where a pop-up (Text), with values displayed from a custom attribute expression - is showing a different value based on what application/where I am accessing it. Some ...
user avatar
  • 121
1 vote
1 answer
51 views

Attribute rule works in Pro 2.9.2, but not in Pro 2.6.8

I have a calculation attribute rule that works in Pro 2.9.2 (in a 2.9.2 FGDB). It updates the M-values of the polyline’s geometry: function pythagoras(x1, y1, x2, y2) { return sqrt(pow(x2 - x1, 2) ...
user avatar
  • 716
0 votes
1 answer
15 views

ArcGIS Collector - Change polygon symbology to black if it has been edited

I have a web map for ArcGIS Collector. The symbology is based on farm type in 2021, "FARM_2021". The symbology is very intuitive, vineyards are purple, strawberries are red, cotton is white, ...
user avatar
0 votes
1 answer
60 views

Using Arcade labelling to sum area of an attribute for a specific a project

I'm struggling to create an expression to sum the total area of a project for a certain attribute. The areas are continuous so I'd like to be able to create a label that had both the features acres ...
user avatar
  • 51
2 votes
1 answer
81 views

What is the arcade equivalent to "If value in list" in the Visualizations profile

What is the arcade equivalent to Python evaluating the conditional statement "If value in list": fueltype = 'JP5' fueltype_list = ['F24', 'JP10', 'JP4', 'JP5'] if fueltype in fueltype_list: ...
user avatar
  • 21
1 vote
2 answers
37 views

How to test if a field exists in a feature?

Is possible to test if a field exists for a feature in the visualisation profile ArcGIS Pro? In the Arcade Playground (https://developers.arcgis.com/arcade/playground/) I've been testing various ...
user avatar
0 votes
1 answer
137 views

Showing attachments in popups using Arcade with ArcGIS Online

I'm trying to follow the instructions in Show Attachments in Pop-ups with Arcade Expressions I want to show the first attachment in a popup in ArcGIS Online and to do that I need to obtain the first ...
user avatar
  • 11
0 votes
1 answer
84 views

Return values to multiple fields — using an Arcade calculation attribute rule in ArcGIS Pro

ArcGIS Pro 2.9: Is there a way to return values to multiple fields using an Arcade calculation attribute rule? For example, return values to the following fields, all within a single expression/rule: ...
user avatar
  • 716
1 vote
1 answer
78 views

Converting array to polyline using Arcade with ArcGIS Pro

Arcade/ArcGIS Pro 2.9: I have an array of polyline vertices: [[[670634.3148,4862051.3579,null],[670719.3321,4862051.0072,null],[670721.44381227,4862055.2956567,null], [670724.26721751,4862059.1529319,...
user avatar
  • 716
1 vote
1 answer
72 views

Calculate length of line without using length function (and without densifying curves)

I have a polyline FC that has true curves (ArcGIS Pro 2.9 FGDB). Arcade: In an effort to find lines that have true curves, I want to compare: The length of the line using the Arcade length() ...
user avatar
  • 716
0 votes
1 answer
44 views

Set unique symbology using multiple values in ArcGIS Online using Arcade

I wanted to use two values to set my unique symbology for use in a map layer in ArcGIS online. Is this possible using the custom expression option? Here is the code I am using. Unfortunately I am only ...
user avatar
  • 3
0 votes
1 answer
40 views

Automate adding symbol size expression for all layers ArcGIS Pro

I have many layers on a map. I need to write an Arcade expression in the symbol size expression box, but I need to do it in all the layers. I do not want to do that one by one. I wanted to create a ...
user avatar
  • 21
0 votes
1 answer
52 views

Getting user input value from ArcGIS web app

I want to have user input an integer value which can then be used in an Arcade expression (for example in a popup menu). Is there a way to do this on ArcGIS Online? I am looking for a solution that ...
user avatar
  • 430
0 votes
0 answers
57 views

Generating UUIDs using attribute rules

Trying to automatically generate a uuid (preferably not a GlobalID) when a record is added to a dataset. It seems like the only Esri suggested workflow is to generate unique IDs is to use Arcade's ...
user avatar
  • 641
0 votes
0 answers
209 views

ArcGIS Pro attribute rule fails when collecting from an online map in Field Maps

I am using ArcGIS Field Maps to collect building inspection records to a standalone table by tapping on a feature in a related building layer. (See Inspect—Add a related report.) The inspection table ...
user avatar
  • 29
0 votes
0 answers
316 views

ArcGIS Arcade Expression to combine multiple layers for use in a serial chart

I am trying to go about combining multiple layers in an dashboard arcade expression for a serial dashboard. I have two layers and I want to use a field from each layer. var portal = Portal('https://...
user avatar
  • 177
-1 votes
1 answer
202 views

Returning values if attributes are same using Arcade with ArcGIS Pro [closed]

I am using ArcGIS Pro. I am trying to return a string if the attribute of another feature is the same as the current one in Arcade: var hazardidpt = FeatureSetByName($datastore, "Hazard Point&...
user avatar
  • 148
0 votes
1 answer
89 views

Create Dictionary Symbology in ArcGIS Online

After some struggling I have been able to create my own dynamic symbols using the Dictionary Symbology in ArcGIS Pro. It does exactly what I want, stacking different symbols based on attribute values ...
user avatar
0 votes
1 answer
85 views

Calculate length and width of polygons using Arcade in Expression Builder in the attribute table in ArcGIS Pro

I am using attribute rules to automatically update cells in an attribute table. I need to auto-calculate the length and width of polygons as the user creates them. Is there a way to do this using math/...
user avatar
1 vote
1 answer
47 views

If/Else statement labelling features on ArcGIS Online Arcade

I have an If/Else statement that works fine in ArcGIS Pro but does not work in ArcGIS Online: if($feature.StreetLength < 3){ return "<FNT size = '8'>" + Left($feature....
user avatar
0 votes
1 answer
202 views

ArcGIS Pro add attribute rule (Arcade expression)

I am trying to create an Arcade expression in add attribute rule which will auto populate the attribute field (DPA_GROUP) in my points layer (as I create new point features) from the underlying ...
user avatar
0 votes
1 answer
189 views

ArcGIS Arcade-Expression - values from several fields

I am looking for an Arcade Expression for ArcGIS Online which does the following: If the value from field A is 222,333 or 444 OR If the value from field B is 222,333 or 444 OR If the value from field ...
user avatar
  • 338
0 votes
0 answers
186 views

Arcade expresion for attribute driven symbology for ArcGIS Online

I need an Arcade expression for attribute driven symbology. I need to assign a different symbol for each returned value of a specific field. For ex: If the return value of "TEST" field ...
user avatar
1 vote
0 answers
48 views

Display Related Data in Popups for Grouped Layers

I am creating a web map from a map service that contains related data. I want to display the related data in my point feature popups. I thought it would be easy to pull in the related tables in Arcade ...
user avatar
  • 11
3 votes
1 answer
326 views

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

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 ...
user avatar
  • 133
1 vote
1 answer
412 views

ArcGIS dashboard Arcade Using multiple If/else if statements

I try to write an Arcade expression in dashboard indicator, the expression has 4 if statements but only the first two statements are works the code is below: ###########################################...
user avatar
  • 23
1 vote
1 answer
216 views

Showing label if greater than percentage using Arcade with ArcGIS Pro

I have a text field called PerVax1 that has percentages. I want to create an expression that labels the features when the field has a percentage greater than 30%. Here's some things I've tried so far:...
user avatar
  • 798
1 vote
1 answer
29 views

Having trouble concatenating with Arcade across fields and having No Data when all columns are empty

I have data that needs to be in a pop-up that is contained across several fields. If the fields have no data, I would like the pop-up to say "No Aviation Resources". Here is what I have so ...
user avatar
  • 11
1 vote
0 answers
19 views

Listing total number of features into an ArcGIS Online feature pop-up when the service consists of grouped features

I'm trying to use the count function to list the total number of features in a feature pop-up. I can do this through configure pop-up/add expression Count($layer) if the feature service consists of ...
user avatar
  • 41
1 vote
3 answers
1k views

ArcGIS Pro arcade if else statements

I am tasked with sorting Zoning codes numbering over 100 to just 5 (Residential, Office, Commercial, Industrial and Misc). For whatever reason I cannot get Arcade to recognize a text attribute other ...
user avatar
0 votes
0 answers
29 views

Listing total number of features into an ArcGIS Online feature pop-up

When configuring a feature service pop-up, how can I get the total number of features listed in the pop-up? For example, I have a hydrant service. When clicking on any hydrant, the pop-up would list ...
user avatar
  • 41
1 vote
2 answers
639 views

Arcade expression to display alias field name and value in popup

I'm trying to return certain fields in my popup in AGOL depending on the value in the visit type field. I'm struggling to figure out how to return the alias field name and value. Right now my ...
user avatar
  • 73
3 votes
1 answer
320 views

Arcade Expression for Label Halo Color

I am trying to label Census Block Groups and Tract ID for the block group feature layer. I would like to label them using different color halos. Is there an arcade expression that will allow me to ...
user avatar
2 votes
1 answer
397 views

TextFormating.NewLine not honored in Field Maps

I have an arcade expression that removes null fields from my pop up in AGOL Map Viewer Beta. I need the same pop up settings to also be honored in Field Maps. When using the TextFormatting.NewLine or &...
user avatar
  • 73
2 votes
1 answer
55 views

Decoding Shape using Arcade in ArcGIS Pro

I have Shape column in ArcGIS Pro. How do I get x,y from it with Arcade?
user avatar
1 vote
0 answers
55 views

Attribute rules for location description

Our organization is working on migrating to ArcGIS Pro and the new Utility Network. I am working on replicating Attribute Assistant functions with the new Attribute Rules in a test environment. We ...
user avatar
0 votes
1 answer
294 views

Symbology with Arcade Expression using ArcGIS Pro

I am using ArcGIS Pro 2.6. I have a line feature class, in the attributes of which there is a field "Type", and "Thickness", I need to make a complex Symbology that unites these 2 ...
user avatar
  • 11
0 votes
1 answer
91 views

Spatial Interactions - ArcGIS Online - Query based on mouse-click

I have a web map, authored and deployed as a web app. It contains a series of points and lines. I was wondering if it was possible to create an ability to click anywhere on the map, and have the ...
user avatar
  • 3,404