|
POST
|
Hi Laura Guthschmidt , I'm glad it works. You were very close, it was just the missing "+". Unfortunately, ArcGIS Online does not have the same support for HTML in the pop-up as ArcGIS Pro and when you configure this in Pro and publish the map, I don't think this will work. Last night ArcGIS Online was updated, so maybe somethings changed. Let me validate and I will confirm if there is enhanced support to return html using Arcade in the pop-up.
... View more
07-01-2020
06:49 AM
|
1
|
1
|
9662
|
|
POST
|
Hi rtehranifar_NYCEDCMGIS , Have a look at the expression below: var col1 = 10; // $feature.col1
var col2 = 30; // $feature.col2
var col3 = 5; // $feature.col3
var col4 = 40; // $feature.col4
var col5 = 20; // $feature.col5
// create array and sort and reverse it
var arr = [col1, col2, col3, col4, col5];
arr = Reverse(Sort(arr));
// return list of values
var result = "";
var cnt = 0;
for (var i in arr) {
cnt += 1;
if (result == "") {
result = cnt + ". " + arr[i];
} else {
result += TextFormatting.NewLine + cnt + ". " + arr[i];
}
}
return result; You can use the Sort and Reverse functions to sort an array (descending). The example above will return this text: 1. 40
2. 30
3. 20
4. 10
5. 5
... View more
06-30-2020
03:44 PM
|
2
|
1
|
5428
|
|
POST
|
Hi Njefcoat_PDX , I'm sorry to confirm that you cannot access other features or related data in the visualization profile (to avoid a performance drop). You will need a Field Calculate to create the necessary data and symbolize on that field. This will not be a very useful option if your data is dynamic.
... View more
06-30-2020
03:27 PM
|
1
|
0
|
1179
|
|
POST
|
Hi E - Erica Hahn (GISS) , I am not a big fan of joining data directly to an Excel file (or using Excel data directly). I assume that Arcade will be able to access the data from the Excel (I have not tested this) and update the hosted feature service based on values from the Excel file. Is it possible to obtain access to a sample of the data?
... View more
06-30-2020
02:25 PM
|
0
|
0
|
3326
|
|
POST
|
Hi Jared Pilbeam , I just changed the script to report the missing groups if they appear in any record and some do, but don't get assigned (since it is not the most predominant group). There are however also a couple of groups that don't seem to occur in the data: Latex Paint 11
Composting Facilities/Landscape Waste transfer Stations 0
Medication Drop-Off 16
Plastic Carrier Strap Recycling 9
Pallet Reuse or Recycling 7
Plastic Container Recycling 15
Motor Oil - Bulk 0
Matress Recycling 0
Medical Equipment (durable) 0
Disposable Batteries 9
Reuse & Resale Shops 0 Please note that I did not run this on your feature service, but on the dataset you shared earlier.
... View more
06-30-2020
02:19 PM
|
1
|
0
|
1869
|
|
POST
|
Hi Laura Guthschmidt , The main problem of the expression is that for each farm you replace the result in stead of adding it to the result. Look at the expression below where I have changed some variable names for me to understand it better: var submittedfarms = Filter(FeatureSetByName($map, "CoordinatesMasterZonal"), "GIS_Submitted LIKE 'TRUE'");
var farms = Intersects(submittedfarms, $feature);
var result = "";
if (Count(farms) > 0) {
for (var farm in farms) {
result += TextFormatting.NewLine + farm.Site_Name + ". " + TextFormatting.NewLine + "View their BEIA report here";
}
} else {
result = "No farms in this province have submitted GIS data yet"
}
return result; The main difference is on line 6 where I use "+="(to add the farm to the result) in stead of "=" (which replaces at each farm). I do have a question the text "View their BEIA report here" you add for each farm. If your goal is to create a hyperlink for each farm, this is something you can't do in ArcGIS Online currently. (I would requiere returning HTML and that is not allowed in ArcGIS Online yet, it is possible in ArcGIS Pro).
... View more
06-30-2020
06:28 AM
|
3
|
8
|
9662
|
|
POST
|
Hi Brian E , You could use something like this: var floors = [10, 13, 20, 23];
if (IndexOf(floors, $feature.FLR_NUM) > -1) {
return "Floor 10, 13, 20 or 23";
} else {
return "Other floors";
} We start with an array with the floors you are looking for (on line 1). Then we use the IndexOf function to see if the features floor is part of that list and return a text to symbolize on.
... View more
06-30-2020
06:17 AM
|
1
|
1
|
2940
|
|
POST
|
Hi Jared Pilbeam , It is possible to use the script and see why those groups do not appear in the results. I can have a look at it if I'm able to find a couple of minutes to spare.
... View more
06-30-2020
06:09 AM
|
0
|
2
|
1869
|
|
POST
|
Hi ehahn_nifc , If you could elaborate a bit on your specific problem in a new question, I would be able to look at he alternative of using Arcade to obtain what you want (even without a join).
... View more
06-30-2020
06:07 AM
|
1
|
2
|
3326
|
|
POST
|
Hi Andy H , I'm glad to hear that it worked for you. Thanks for letting me know.
... View more
06-30-2020
06:05 AM
|
0
|
0
|
7745
|
|
POST
|
Hi Andy H , Did you have a chance of looking at the solution provided?
... View more
06-27-2020
10:46 AM
|
1
|
2
|
7745
|
|
POST
|
Hi Michaila Musman , With the expression you shared you are returning a text value and you want to return a numeric value. After that you will be able to configure how AGOL should interpret the value and stretch the transparency over the range of value returned by your expression. To make it more visually, return values and not strings: Then you will get another window to specify how to apply the transparency: And the result will be something like this (red, empty values, transparency of 50%):
... View more
06-26-2020
02:43 PM
|
1
|
0
|
1871
|
|
POST
|
Hi Matt Willcox , When you use the FindLabel function you provide two parameters. Those are the attributes of the current feature. If you want to get the maximum date from a set of feature, you will need to connect to the datasource in the script and extract the values to perform the analysis that you need. Doing this can have a mayor impact on performance, since for every feature it will loop through features of a datasource. If you have many features this is likely to become very slow.
... View more
06-25-2020
06:47 AM
|
0
|
0
|
1997
|
|
POST
|
Hi Willcoxm14 , Can you share what you have so far?
... View more
06-25-2020
06:12 AM
|
0
|
0
|
1997
|
|
POST
|
Hi GeosenseAgol , If your end goal is to use the attribute rule in ArcGIS Online, then I am afraid that ArcGIS Online does not support this yet. Attribute rules are executed at the database level and at this momento only available in Enterprise Geodatabases and File Geodatabases.
... View more
06-25-2020
06:10 AM
|
0
|
0
|
3024
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-09-2020 09:26 AM | |
| 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 |
| Online Status |
Offline
|
| Date Last Visited |
4 weeks ago
|