|
POST
|
Hi @AdrianPatrulescu , Let me see if I get this right. In the example of "FC 183n" you want to obtain 7 records (not include duplicates) and calculate the sum of all the RestorationArea for "FC 183n", which in this case would be "129.12" and not "152,68". If so, for the future it would be better to store the interventions in a related table and not duplicate the areas. Maybe it would be possible to create a copy of the dataset using the Delete Identical (Data Management) in ArcGIS Pro. It is possible to do this (manually) using Arcade, but before investing time in programming, it is best to evaluate other less complex options.
... View more
09-29-2021
07:13 AM
|
0
|
1
|
2760
|
|
POST
|
Hi @AdamGebhart , It is possible, however, there are some things to keep in mind. With an Arcade expression, you can intersect the $feature with the $layer and access the information for all the polygons. In your example, you have 2 polygons and I assume there can be more at the same location. If you implement the expression, it will find 2 polygons and execute the expression for each polygon. It will not hide the "1 of 2" of "1 of 3" at the top of the pop-up window and when you have many polygons it can make the visualization of the pop-up window slow. Can you explain a bit why you have multiple stacked polygons?
... View more
09-28-2021
08:39 AM
|
0
|
3
|
3982
|
|
POST
|
Hi @AdrianPatrulescu , I just had a look at the data, and below you will find a specific case so you can walk me through it: It is a single ID_FCC with multiple RestorationArea values in which for two cases the area is repeated. You will see two additional fields SUM (sum of the RestorationArea) and Count (frequency). I also included the other fields you are interested in, but they seem to have the same values. For this specific case, what type of queries do you need to perform?
... View more
09-28-2021
08:04 AM
|
0
|
3
|
2768
|
|
POST
|
Hi @AdrianPatrulescu , I can help, but that would require access to the data. There are a couple of things I have to see in the data to verify if what you want to achieve is possible. If the data is published in ArcGIS Online, you can create a group and share the data with the group and invite me to the group using "xbakker.spx" as user name.
... View more
09-28-2021
05:41 AM
|
0
|
5
|
2771
|
|
POST
|
Hi @AdrianPatrulescu , This is possible but will require some more scripting and collecting all the data in a different data format so you can return a featureset that includes all the information and allows the filtering you need.
... View more
09-27-2021
08:16 AM
|
0
|
7
|
2774
|
|
BLOG
|
Hi @AdamBakiera , I agree that it would be a lot easier to have an option that allows you to suppress the field if it is empty. It would be very cumbersome to use multiple expressions per field to obtain the desired result. Hopefully, we will see this option in the near future.
... View more
09-23-2021
07:20 AM
|
1
|
0
|
3929
|
|
POST
|
Hi @AdrianPatrulescu , The distinct function only returns the values that are used in the distinct function. You can include the other fields in the distinct function, but if you have multiple values for the other fields for each distinct 'ID_FCC' and 'RestorationArea' combination you will need to determine what you want to do with this (which value to return).
... View more
09-23-2021
06:57 AM
|
0
|
0
|
2782
|
|
POST
|
Hi @Greta When you click on the flood area you want to see the suburb at the location where you clicked. The problem is that when you start with the flood area polygon it will use the entire polygon to see what suburbs it intersects with and when your flood area polygon is large it will intersect with a large number of suburbs. At this moment it is not possible in the Arcade expression to have access to the location where the user clicked and therewith being able to return a single suburb at the location. You will have in the pop-up a button to go through all the features at the location where the user clicked and have access to the suburb, but not as you want in the pop-up of the flood area: You could also go a little further and present information of multiple suburbs and the % of the area that the flood area covers the suburb. There are many possibilities. I have created an idea to provide access to the location clicked, but it is not implemented yet. Hopefully, this will happen soon.
... View more
09-23-2021
06:45 AM
|
0
|
2
|
5956
|
|
BLOG
|
Hi @AdamBakiera , Quick question, does the expression return the "filtered" information correctly in a single field, but do the rest of the fields still display? If so, you would need to hide the fields that are already displayed with the Arcade expression: Go into the pop-up configuration, and in the list of fields you will see the option to select the field you want to include in the pop-up.
... View more
09-23-2021
06:19 AM
|
0
|
0
|
3938
|
|
POST
|
Hi @dstrigl , I have no idea how the data was published and from what format, but I am glad that the test you performed shows that it does work (for the test dataset). This confirms that the issue is data-related. I would recommend you to reach out to support and create a case to discover the reason why this is not working. The fact that you are using ArcGIS Online helps since you automatically always have access to the latest version.
... View more
09-14-2021
04:10 PM
|
0
|
1
|
1259
|
|
POST
|
Hi @dstrigl I really think this has something to do with the data. Just did a small test with a data expression in the Dashboard and it can find the domain (in my data the code and description are the same values, but the domain can be accessed after reading the featureset using FeatureSetByPortalItem():
... View more
09-13-2021
12:53 PM
|
0
|
0
|
1270
|
|
POST
|
Hi @dstrigl , I think it is not the FeatureSetByPortalItem() function that is doing this. I just did a small test (in a pop-up, not in a data expression) with this function and I have access to the domain after reading the featureset with the FeatureSetByPortalItem() function. So, could I wonder what is the data source of the data? Are you working with ArcGIS Online or with Enterprise (and if it is Enterprise, what version)? When you include the expression in a pop-up do you have access to the domain? I will do a small check within a Dashboard because maybe it is something related to the way Arcade has been implemented in the Dashboards.
... View more
09-13-2021
12:45 PM
|
0
|
1
|
4510
|
|
POST
|
Hi @dstrigl , I think this is caused by GroupBy function which will take the values of the account managers and not the descriptions. There are different ways to resolve this, but below you can see how you can create an intermediate dictionary and harvest the values that you need and write the result after this. var p = Portal('https://www.arcgis.com');
var itemId = '???';
var layerId = 1;
var fs = Filter(FeatureSetByPortalItem(p, itemId, layerId, ['ACCOUNT_MANAGER', 'REGION'], false), 'ACCOUNT_MANAGER > 0');
var dict = {
'fields': [
{ 'name': 'ACCOUNT_MANAGER', 'type': 'esriFieldTypeString' },
{ 'name': 'COUNT_REGIONS', 'type': 'esriFieldTypeInteger' }],
'geometryType': '',
'features': []
};
// create an intermediate dictionary
// to store a list of unique regions per account manager
var d = {};
var l = [];
for (var f in fs) {
var accman = DomainName(f, 'ACCOUNT_MANAGER');
var region = f["REGION"];
if (HasKey(d, accman)) {
l = d[accman];
Insert(l, 0, region);
} else {
l = [region];
}
d[accman] = Distinct(l);
}
// write the dictionary to the output featureset
var index = 0;
for (var accman in d) {
dict.features[index] = {
'attributes':
{'ACCOUNT_MANAGER': accman,
'COUNT_REGIONS': Count(d[accman]),
},
}
index++;
};
return FeatureSet(Text(dict));
... View more
09-10-2021
03:35 PM
|
0
|
3
|
4539
|
|
POST
|
Hi @dstrigl , Just a little note; since you create a FeatureSet you could include the domain definition in the creation process. However, it might be easier to create the field with the domain description rather than the domain code for visualization purposes.
... View more
09-08-2021
08:30 AM
|
0
|
5
|
4550
|
|
POST
|
Hi @Anonymous User , I'm glad it works and as you noticed there is a big difference between an integer and a date. I changed the calculation using DateDiff, but this requires two dates to compare. In your case using an integer your calculation does the job.
... View more
09-08-2021
06:17 AM
|
1
|
1
|
3136
|
| 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 |
11-26-2025
02:43 PM
|