|
POST
|
Hi @AdamGebhart , So you have a group layer in your (classic 3.x) web map and the Arcade expression I assume you are configuring in the pop-up. Is that correct? When you want to access data in the map, I would suggest using the expression builder. There are two easy ways of assessing the data in the map, one is using $map that is creating problems, but since the data has the same datastore, you could try and use $datastore and see if that works. In the interface you can click on the arrow pointing to the right (">") next to "$datastore" and navigate to the layers in the same datastore as your feature. this will list the layers (rest endpoints in the same service) and select the ones you need for the expression: If you have any problems, let me know.
... View more
01-25-2022
07:49 AM
|
0
|
10
|
2908
|
|
POST
|
Hi @martav , As mentioned in this thread (https://community.esri.com/t5/arcgis-online-questions/find-number-of-selected-features-list-items-in/m-p/588548) Arcade has no access to the selected features in a map. When you have a selection in the map you can define an action that filters the features used for in indicator. However, this only works when the indicator is using the same feature source. In case the selection should propagate to a different featureset, you can only do this by matching field values. So for me, the main question is, if it is necessary to use an Arcade expression for the indicator or the indicator can point to the same source? From what I understand from your description you have multiple fields you need to sum per feature which is used later on to determine the average for the selected features. Summing values will require Arcade, but using Arcade will result in a different FeatureSet and that might complicate filtering the result of the indicator by the selected features.
... View more
01-25-2022
07:34 AM
|
1
|
0
|
883
|
|
POST
|
Hola Fernando, Gracias por compartir el mensaje del error, pero todavía no es claro que tipo de elemento visual están usando en el tablero. Existen diferentes condiciones según el tipo de elemento que estás usando. Con cual versión de Dashboard estás creando el tablero (en AGOL con el clásico o la nueva, o si es en Enterprise, que versión de Enterprise y si es clásico o la nueva versión). También sería bueno saber si eres el dueño de los datos y que campos estás usando (tipo de los campos).
... View more
01-17-2022
12:51 PM
|
0
|
0
|
1891
|
|
POST
|
Hola Fernando, Puedes especificar que tipo de fuente de datos estás usando y también el tipo de elemento donde quieres usar la información?
... View more
01-17-2022
12:18 PM
|
1
|
0
|
1901
|
|
POST
|
@JoeBorgione sorry for the late comment, but it has been both a pleasure and a privilege to interact with you and learn from you. Your leave your footprints in this community; great solutions, helpful comments, and funny remarks will keep on helping people all around the globe! Enjoy your retirement and hope to see you around!
... View more
01-12-2022
09:17 AM
|
1
|
1
|
872
|
|
POST
|
Hi @bnmcknigh , I don't think you are missing anything. I just noticed that when your symbology is based on an Arcade expression, it looks like it does not scan for the possible values that can result and just returns a single value. Since you cannot add values in the Map Viewer, you would need to edit the json in https://ago-assistant.esri.com/ and add the missing categories, which is not something I recommend. It is better to log this with support.
... View more
12-10-2021
12:58 PM
|
1
|
1
|
3296
|
|
POST
|
Hi @Stefan_Thorn , Sorry about that, but the alignment options will only be available for point data.
... View more
12-06-2021
06:00 AM
|
0
|
1
|
2279
|
|
POST
|
Hi @Stefan_Thorn - the arcade expression is not accepted. So why Arcade in ArcGIS pro is different from AGOL? - the arcade expression is not accepted. - labels cannot be aligned anymore? Unfortunately, there are differences in Arcade versions as you can find in the version matrix: https://developers.arcgis.com/arcade/guide/version-matrix/ . In this case, it is not the version difference, but the fact that the labels in a web map currently do not support these HTML-like capabilities that allow you to change the font of parts of the label. Next week there will be an update and many changes are coming to the map viewer (not the Map Viewer Classic). There are some changes that allow you to edit HTML for the pop-up, but I do not know if this changes something for the font settings that you are using in Pro. in the Map viewer labels can be aligned already. You will find the placement options when you edit the style: Not sure if the new version will have label rotation.
... View more
12-03-2021
01:48 PM
|
0
|
3
|
2284
|
|
POST
|
Hoi @Ade_Bruijn , Your expression is close, but when you intersect the "wijken" layer with a "buurt", you obtain a featureset or in other words a collection of features even if there is only one feature. You will have to take for instance the first wijk found and then you can access the attribute that contains the name fo the "wijk". var wijken = FeatureSetById($map, /* concept wijken(afgeleid_van_buurten) */ "CBS_wijken_afgeleid_van_buurten__3310");
var wijk = First(Intersects(wijken, $feature));
return wijk["VeldNaamVanVeldMetWijkNaam"]; There is a potential catch... it is possible that a neighboring "wijk" is also returned and to avoid obtaining the wrong "wijk" name you could do a negative buffer to reduce the size of the "buurt" (current feature) and ensure that you get the right "wijk". An example you can find below: var wijken = FeatureSetById($map, /* concept wijken(afgeleid_van_buurten) */ "CBS_wijken_afgeleid_van_buurten__3310");
var buf = Buffer($feature, -1, "meter");
var wijk = First(Intersects(wijken, buf));
return wijk["VeldNaamVanVeldMetWijkNaam"];
... View more
11-19-2021
09:02 AM
|
2
|
1
|
5805
|
|
DOC
|
Hi @KylieRyan , Not sure what might be going wrong with the expression. The only thing I can think of is it doesn't find the layer in the map (check the exact name) or the feature does not intersect with any features from the featureset or there are differences in coordinate systems between the feature and the featureset. I reorganized the expression a bit, but no big changes: function getAttributeFromLargestArea(geom, fs, field) {
var items = Intersects(fs, geom);
var counts = Count(items);
if (counts == 0) {
return {'errorMessage': 'No intersection found'};
}
if (counts == 1) {
var result = First(items);
return result[field];
}
var largest = -1;
var result;
for (var item in items) {
var size = Area(Intersection(item, geom));
if (size > largest) {
largest = size;
result = item[field];
}
}
return result;
}
// var layerName = $layer;
var fieldName = "parcel_title";
var fs = FeatureSetByName($map, "council_data.property");
return getAttributeFromLargestArea(Geometry($feature), fs, fieldName);
... View more
11-18-2021
06:57 AM
|
0
|
0
|
11351
|
|
POST
|
Hi @TroyGray , I have seen this type of error when the feature set does not have GlobalIDs. Can you validate that it does?
... View more
11-18-2021
06:48 AM
|
0
|
1
|
1394
|
|
DOC
|
Hi @PhallyGnean , Maybe it is better to enforce a unique value by using a Calculation Attribute in combination with a database sequence. See: https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/attribute-rule-script-expression.htm#anchor1 Your Constraint or Validation Attribute Rule could also check to see if a value is unique. However, if you have a large dataset this could have an impact on performance.
... View more
11-10-2021
10:04 AM
|
0
|
0
|
11121
|
|
POST
|
Hi @DataOfficer , To avoid having to enter the list of fields and define how many decimals should be used you can use the Text function and format it the way you want. Have a look at the example below: var x1 = PI * 100;
Console(x1);
var x2 = Round(x1, 3);
Console(x2);
var x3 = Text(x2, "#.00");
Console(x3);
var x4 = Text(x2, "#");
Console(x4); This will write to the console: 314.1592653589793
314.159
314.16
314 Contains the original value (PI * 100) The result of rounding it to 3 decimals (it is still a number) Converting to a text indicating to format it using always ("0") 2 decimals (even when 0) Converting to a text using no decimals and eliminating leading/trailing zeros ("#")
... View more
10-27-2021
05:49 AM
|
2
|
1
|
9576
|
|
POST
|
Hi @DataOfficer , The same applies. In the list of fields you will need to specify the decimals for the (virtual) field "expression/expr2".
... View more
10-26-2021
10:17 AM
|
2
|
3
|
27190
|
|
POST
|
Hi @AdamGebhart , If you want to show hyperlinks in the pop-up, it is important to know that Arcade can create the list of URLs, but they won't appear as hyperlinks in the pop-in in ArcGIS Online. It will be plain text.
... View more
09-29-2021
07:15 AM
|
0
|
1
|
3954
|
| Title | Kudos | Posted |
|---|---|---|
| 6 | 12-20-2019 08:41 AM | |
| 1 | 01-21-2020 07:21 AM | |
| 2 | 01-30-2020 12:46 PM | |
| 1 | 05-30-2019 08:24 AM | |
| 1 | 05-29-2019 02:45 PM |
| Online Status |
Offline
|
| Date Last Visited |
a month ago
|