Questions tagged [arcade]
Use for questions about Arcade expression language used across ArcGIS Platform
138
questions
0
votes
0
answers
13
views
ArcGIS Pro Arcade Expression - Validation Rule
I am trying to create a validation rule that identifies duplicates within the column ID. Can anyone see where is the problem? I am getting all the features as returns which is not the intention with ...
0
votes
1
answer
11
views
Superscript ordinals for street labels in ArcGIS Pro
I'm using ArcGIS Pro 3.0. I have a Streets feature class that includes the ordinal for numeric streets in the street name field. For example, for "13th Street", the name field is "13th&...
0
votes
0
answers
13
views
Custom operations in ArcGIS Insights dashboard
I have a point layer of city trees. I'm setting an ArcGIS Insights Dashboard to analyse this data set.
I have set some linked maps and charts: species treemap, barchart of trees by neighborhood,etc.
I'...
0
votes
2
answers
26
views
How to find the number of unique values in a field using Arcade expression in ArcGIS Online
I have a field in my attribute named Status which has three uniques values, I am trying to get the count of the unique values, but I cannot get the count.
The field looks like,
Status
Work
Stop
...
0
votes
1
answer
32
views
Simple expression to limit string count in an attribute field
Looking to create an attribute rule to constrain a value in an attribute field to a certain length. I used to be able to use "stringcount" in VB script to return features of a certain ...
1
vote
1
answer
46
views
Using arcade in an attribute rule: error "array type expected" (ArcGIS Pro)
I want to do the following attribute rule in ArcGIS Pro:
Query the excavation ID attribute according to xxx.xxx.x / x.xx.x / xxx.xx.x / xx.xx.x (e.g. Bhg.018.1 / B.33.2 / Lhb.28.3 etc). , i.e. the 2- ...
1
vote
0
answers
40
views
ArcGIS Pro Pop-ups: How do I show all attributes in rows of a single table?
I have a pop-up configured to display a set of results for a selected location. Using Arcade expressions and HTML, I get a pop-up that looks like this:
I need to show all of the rows for each Z range ...
1
vote
1
answer
23
views
How to include layer symbology in ArcGIS Online popup
Is it possible to include a layer's symbology within the popup in ArcGIS Online? Below is an example of 2 different types of symbology that I'm using in my ArcGIS Online map. The fork/spoon icon ...
0
votes
1
answer
37
views
ArcGIS Pro Arcade If-And Statement
I have an Expression that I am trying to create for symbology that essentially filters on three categories. The Two are very simple, the last one has a lot of criteria that work for it. For example, ...
0
votes
1
answer
41
views
ArcGIS Arcade Determining if a sorted array of numbers has consecutive numbers within it
I have an array of numbers and want to determine the starting number and ending number of any numbers that are consecutive. The numbers will always be in ascending order.
I would like to create a ...
1
vote
2
answers
74
views
ArcGIS Arcade Labeling When Text Includes HTML Reserved Characters
I am using the following expression in an ArcGIS feature label:
"(CH<SUB>4</SUB> " + $feature.Methane + " ppm)"
This works (e.g., CH4 15 ppm) unless the $feature....
1
vote
1
answer
81
views
Formatting Symbology [offset distance] with Arcade Expression in ArcGIS Online
I'm trying to create a web map that highlights chemistry sampling data for my organization. Each station point has several "chemistry parameters" that needs to be displayed in a "bar ...
0
votes
1
answer
220
views
Is there a specific arcade expression to remove duplicate labels?
I am working within ArcGIS Online to create a web map. I am trying to remove some labels that have duplicate labels to only show one. I have two fields that I am labelling. One is called "...
0
votes
1
answer
123
views
Arcade Intersects returns geometries with same areas
I am writing an Arcade expression for a pop-up that will intersect the selected geometry with an underlying layer that has 6 different types of values (C, S, R, O, OC, EMO). I want the expression to ...
3
votes
2
answers
352
views
Multiple If statements in one ArcGIS Arcade Expression
I'm trying to get this popup expression to work in ArcGIS Online using ArcGIS Arcade.
if ($feature["Road_Work_Ahead_Deployed"] >= 1){
return "Road Work Ahead Deployed: " + $...
0
votes
0
answers
233
views
FeatureSetByName Arcade expression to populate a related table
I am having issues building an Arcade expression to auto populate a field in a related table for a field test/inspection form.
I have a hydrant layer with associated inspection form (related table). ...
1
vote
1
answer
232
views
ArcGIS Online Arcade Count Features
I'm creating a dashboard using ArcGIS Experience Builder and I'm having trouble writing Arcade code to display the total number of assets with a condition equal to excellent.
I think I'm on the right ...
0
votes
1
answer
377
views
Converting a text date to a date in Arcade
I am attempting to convert string which is formatted like MM/DD/YYYY to an actual date format in Arcade on ArcGIS Online. This is the code I am using.
var cd = split($feature["DATE_"], "...
0
votes
1
answer
80
views
How do I conditionally return information in an ArcGIS Online popup using an Arcade data expression?
I am formatting a pop up and have one attribute where some of the features have a value and the others are empty. I want to make it so when I click on a feature that has a notes value, it shows up in ...
0
votes
0
answers
39
views
Arcade expression to access map service directly
Is there any way to access the map service directly with the REST URL? In my case the ArcGIS Server is not federated. I wonder if we can access the service without portal item ID function.
1
vote
1
answer
153
views
Using Arcade to label polylines with X coordinates of last vertices in ArcGIS Pro
I am using ArcGIS Pro 3.0.0 and a File Geodatabase.
I have a requirement to use Arcade for configuring some Attribute Rules related to the geometry of the features involved which has led me to realize ...
0
votes
1
answer
128
views
Auto-calculating Geodetic Length using Geographic Coordinate System other than WGS 1984
At How to show geodatabase calculated area and length in meters from WGS84 FC? (from 2018) it was said that "a little further ahead it will be possible to use Arcade expression (in Pro, not ...
0
votes
1
answer
45
views
Displaying both numeric and text values in Label using Arcade?
I am using ArcGIS Online.
I had created this label using Arcade because I had to customize the wind speed outcome from km/h to mph. I wanted to add "mph" to label after the wind speed value, ...
1
vote
1
answer
399
views
Using Attribute Rules to Pull in Attribution from Another Feature Class
I could use some assistance creating a calculation that just simply pulls attribution from a field in one feature class, and populates the edited result into another feature class's table. For ...
0
votes
1
answer
59
views
Vary symbol rotation to point towards the next point in a sequence using Arcade and ArcGIS Pro
I have created a 3D map in ArcGIS Pro that shows the flight path of a drone. I want to use arrows for the symbology that point in the direction of the flight path. Each observation includes elapsed ...
0
votes
0
answers
147
views
Listing nearest feature in popup using Arcade with ArcGIS Online
I am using ArcGIS Online.
I would like to show the list of nearest substations in the popup of the areas that I'm drawing.
I've managed to get it in the console but I cannot return a list in the ...
0
votes
1
answer
322
views
Converting data type in a ESRI Dashboard via Arcade
I am creating an ESRI dashboard. I am pulling data in from a table in AGOL via the "New Data Expression" option. I need to pull in the data table, plus create a new field, DATE_FILTER (type =...
0
votes
1
answer
207
views
Arcade script for popup in ArcGIS Online [closed]
I am new to Arcade and I am trying to build a Pop-up display in ArcGIS Online web map.
I have four Feature datasets in a map, one being a Local Government layer for the state.
I am trying to develop a ...
0
votes
0
answers
111
views
Field Maps web form - make field visible in all cases but required for only certain previous field domain values
In the Field Maps configurable web form I am trying to make a Notes field visible in all cases but required for only certain previous field domain values.
Use case: For tree monitoring we want staff ...
0
votes
0
answers
464
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 ...
0
votes
0
answers
324
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 "...
3
votes
1
answer
905
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 ...
2
votes
1
answer
635
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">...
1
vote
0
answers
68
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 ...
1
vote
1
answer
394
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 ...
1
vote
1
answer
419
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 ...
0
votes
0
answers
91
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 ($...
0
votes
1
answer
159
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>" ...
0
votes
1
answer
2k
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, "...
0
votes
0
answers
142
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 ...
0
votes
1
answer
314
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 ...
2
votes
1
answer
86
views
Attribute rule works in Pro 2.9.2, but not in Pro 2.6.8 [closed]
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) ...
0
votes
1
answer
22
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, ...
0
votes
1
answer
292
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 ...
2
votes
1
answer
842
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:
...
1
vote
2
answers
239
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 ...
0
votes
1
answer
787
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 ...
1
vote
1
answer
386
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:
...
2
votes
1
answer
244
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,...
0
votes
1
answer
394
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 ...