POST
|
Hi @JohannesLindner - Thank you! This speeds up my dashboard significantly! I go from about 2 minutes to load to maybe 10-15 seconds.
... View more
05-19-2023
05:33 AM
|
0
|
1
|
951
|
POST
|
I wanted to post my solution to this in case it is useful to others. I reached out to our local Esri contacts and was informed that while this is possible using Arcade, there is a bug in the map viewer which prevents it from working properly. Below is a workaround which I tested and was successfully able to implement in my map: Open your web map and select the layer > Styles. Set symbology and then toggle on "Transparency by attribute" at the bottom of the Styles dialog. Click the </> and add a new expression. Leave expression title as "New expression". In body, type $view.scale Click Save. Select a numeric field for transparency normalization (I selected "Shape_Length"). Open AGO Assistant and view the JSON of your web map. In the JSON code, locate the code that looks like this: 10. Replace it with something like this. Note that where I have "36111.909643" should be the scale at which you want the transparency to change. I tested this and it worked. I would recommend testing in a copy of your web map and copying/pasting default JSON into Notepad just in case.
... View more
05-15-2023
05:58 AM
|
1
|
0
|
782
|
POST
|
Hi Johannes, Thank you for this suggestion. Unfortunately, I am getting an unknown error when I test my expression. Here is what I've done: function Memorize(fs) {
var temp_dict = {
fields: Schema(fs)['fields'],
geometryType: '',
features: []
}
for (var f in fs) {
var attrs = {}
for (var attr in f) {
attrs[attr] = Iif(TypeOf(f[attr]) == 'Date', Number(f[attr]), f[attr])
}
Push(
temp_dict['features'],
{attributes: attrs}
)
}
return FeatureSet(Text(temp_dict))
}
// skip some lines to make this concise...
// load the watersheds
var watersheds = Memorize(FeatureSetByPortalItem(p, '4a7abb05f6eb42d78e31587b05e3ebec', 0, ['NAME'], false))
// create an empty feature array
var features = []
// iterate over the input layers
for(var i in layers) {
var layer = layers[i]
// load and filter
var fs = Memorize(FeaturesetByPortalItem(p, layer.id, layer.subid, [layer.file_number], true))
... View more
05-15-2023
05:18 AM
|
0
|
3
|
976
|
POST
|
Hi again @ShengdiZhang - I was able to get my print service to work, however am experiencing issues printing the basemap that is used within my web map. When a print successfully generates, the entire background is grey. Are you able to assist with this? *I have sent you an updated print service URL via direct message.* Below is a screenshot of the basemap layers used within my map. Two are Vector Tile Layers, while one is a Tile Layer. The layers have been configured within my web map in the following ways: Human Geography Label = reference layer; 25% transparency World Terrain Base = effects, brightness & contrast enabled with following settings World Hillshade = effects, brightness & contrast enabled with following settings The following are direct links to the basemap layers: Human Geography Label - https://www.arcgis.com/home/item.html?id=ba52238d338745b1a355407ec9df6768 World Terrain Base - https://mass-eoeea.maps.arcgis.com/home/item.html?id=33064a20de0c48d2bb61efa8faca93a8 World Hillshade - https://services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer Thank you,
... View more
05-08-2023
10:16 AM
|
0
|
0
|
1055
|
POST
|
Hi @JohannesLindner - Thank you for the code! It does work, but it takes a LONG time for the featureset to populate (today was actually the first day I waited long enough for it to work - the other day when I tested this I gave up after a minute of a spinning wheel). I am wondering if there are ways to speed this up/make it more efficient? My feature class (the points classified as stable/unstable) has 2,300+ features and continues to grow at a slow pace. Do you have any suggestions? Thank you!
... View more
05-05-2023
04:48 AM
|
0
|
5
|
1003
|
POST
|
@ShengdiZhang I have shared the print service with you via direct message.
... View more
05-04-2023
05:19 AM
|
0
|
0
|
1064
|
POST
|
Hi @ShengdiZhang - I am publishing a print service from enterprise 10.9.1. It is shared publicly and used within an Experience Builder app in ArcGIS Online. I've followed instructions in both the technical support work around AND your most recent post. The legend still does not print. Please see settings below. Another interesting note, basemaps will not draw when printing in Experience Builder - I see all grey as a background. When I test the same print service in Web App Builder, the basemap draws no problem. See second screen capture for basemaps used.
... View more
05-03-2023
08:32 AM
|
1
|
3
|
1074
|
POST
|
Hi - I have the following data expression in my dashboard and it is working perfectly, however my users want to be able to filter this chart by "watershed", which is not currently possible because this is not a field in my data or data expression. I have a separate hosted feature layer for watersheds that I will use to determine this. I've used "Intersects" to calculate values in Field Maps & to show additional information in pop-ups, but I am not sure where exactly I should be fitting it into this expression to get what I want, which is a table that has a count of inspections, with their project ID and watershed. Please see below. This is my existing data expression that is working well: // Create a FeatureSet for stable and unstable inspections.
// Group the features by the CGP file number
// Create filtered feature set for stable inspection points
var filterStablePts = Filter(FeatureSetByPortalItem(Portal('https://mass-eoeea.maps.arcgis.com'), '12345x', 1, ['Point_Status', 'SV_CGP_File_Number'], true), "Point_Status = 'Stable'");
var StablePts = GroupBy(filterStablePts,
["SV_CGP_File_Number"],
[
{name: "stable", expression: "Point_Status", statistic: "count"},
]
);
// Create filtered feature set for unstable inspection points
var filterUnstablePts = Filter(FeatureSetByPortalItem(Portal('https://mass-eoeea.maps.arcgis.com'), '12345x', 1, ['Point_Status', 'SV_CGP_File_Number'], true), "Point_Status = 'Unstable'");
var UnstablePts = GroupBy(filterUnstablePts,
["SV_CGP_File_Number"],
[
{name: "unstable", expression: "Point_Status", statistic: "count"},
]
);
// Create filtered feature set for general observation points
var filterObsPts = Filter(FeatureSetByPortalItem(Portal('https://mass-eoeea.maps.arcgis.com'), '12345x', 1, ['Point_Status', 'SV_CGP_File_Number'], true), "Point_Status = 'General Obs.'");
var ObsPts = GroupBy(filterObsPts,
["SV_CGP_File_Number"],
[
{name: "observation", expression: "Point_Status", statistic: "count"},
]
);
// Create filtered feature set for stable revisit (table) records
var filterStableRevis = Filter(FeatureSetByPortalItem(Portal('https://mass-eoeea.maps.arcgis.com'), '12345x', 3, ['R_Point_Status', 'R_CGP_File_Number'], true), "R_Point_Status = 'Stable'");
var StableRevis = GroupBy(filterStableRevis,
["R_CGP_File_Number"],
[
{name: "stablerevis", expression: "R_Point_Status", statistic: "count"},
]
);
// Create filtered feature set for unstable revisit (table) records
var filterUnstableRevis = Filter(FeatureSetByPortalItem(Portal('https://mass-eoeea.maps.arcgis.com'), '12345x', 3, ['R_Point_Status', 'R_CGP_File_Number'], true), "R_Point_Status = 'Unstable'");
var UnstableRevis = GroupBy(filterUnstableRevis,
["R_CGP_File_Number"],
[
{name: "unstablerevis", expression: "R_Point_Status", statistic: "count"},
]
);
// Create an empty dictionary to hold the data
var combinedDict = {
fields: [
{name: "File_Number", type: "esriFieldTypeString"},
{name: "Pt_Status", type: "esriFieldTypeString"},
{name: "Num_Inspections", type: "esriFieldTypeInteger"},
],
geometryType: "",
features: [],
};
// Fill the new dictionary with data
var i = 0;
// Loop through features and parse them into appropriate fields within dictionary
// Stable point inspections
for (var m in StablePts) {
combinedDict.features[i] = {
attributes: {
File_Number: m["SV_CGP_File_Number"],
Pt_Status: "Stable",
Num_Inspections: m["stable"],
},
};
i++;
}
// Unstable point inspections
for (var n in UnstablePts) {
combinedDict.features[i] = {
attributes: {
File_Number: n["SV_CGP_File_Number"],
Pt_Status: "Unstable",
Num_Inspections: n["unstable"],
},
};
i++;
}
// General observation points
for (var q in ObsPts) {
combinedDict.features[i] = {
attributes: {
File_Number: q["SV_CGP_File_Number"],
Pt_Status: "General Observation",
Num_Inspections: q["observation"],
},
};
i++;
}
// Stable revisit records (table)
for (var o in StableRevis) {
combinedDict.features[i] = {
attributes: {
File_Number: o["R_CGP_File_Number"],
Pt_Status: "Stable Revisit",
Num_Inspections: o["stablerevis"],
},
};
i++;
}
// Unstable revisit records (table)
for (var p in UnstableRevis) {
combinedDict.features[i] = {
attributes: {
File_Number: p["R_CGP_File_Number"],
Pt_Status: "Unstable Revisit",
Num_Inspections: p["unstablerevis"],
},
};
i++;
}
return FeatureSet(Text(combinedDict)); This is where I am with adding in the Intersects piece - I've tried a few different things in different places within here, but I can't figure out where this should go/how to incorporate it. We have a separate Watersheds hFL which I am attempting to intersect against. See lines 67, 68, 81 below. // Create a FeatureSet for stable and unstable inspections.
// Group the features by the CGP file number
// Create filtered feature set for stable inspection points
var filterStablePts = Filter(FeatureSetByPortalItem(Portal('https://mass-eoeea.maps.arcgis.com'), '12345x', 1, ['Point_Status', 'SV_CGP_File_Number'], true), "Point_Status = 'Stable'");
var StablePts = GroupBy(filterStablePts,
["SV_CGP_File_Number"],
[
{name: "stable", expression: "Point_Status", statistic: "count"},
],
);
// Create filtered feature set for unstable inspection points
var filterUnstablePts = Filter(FeatureSetByPortalItem(Portal('https://mass-eoeea.maps.arcgis.com'), '12345x', 1, ['Point_Status', 'SV_CGP_File_Number'], true), "Point_Status = 'Unstable'");
var UnstablePts = GroupBy(filterUnstablePts,
["SV_CGP_File_Number"],
[
{name: "unstable", expression: "Point_Status", statistic: "count"},
]
);
// Create filtered feature set for general observation points
var filterObsPts = Filter(FeatureSetByPortalItem(Portal('https://mass-eoeea.maps.arcgis.com'), '12345x', 1, ['Point_Status', 'SV_CGP_File_Number'], true), "Point_Status = 'General Obs.'");
var ObsPts = GroupBy(filterObsPts,
["SV_CGP_File_Number"],
[
{name: "observation", expression: "Point_Status", statistic: "count"},
]
);
// Create filtered feature set for stable revisit (table) records
var filterStableRevis = Filter(FeatureSetByPortalItem(Portal('https://mass-eoeea.maps.arcgis.com'), '12345x', 3, ['R_Point_Status', 'R_CGP_File_Number'], true), "R_Point_Status = 'Stable'");
var StableRevis = GroupBy(filterStableRevis,
["R_CGP_File_Number"],
[
{name: "stablerevis", expression: "R_Point_Status", statistic: "count"},
]
);
// Create filtered feature set for unstable revisit (table) records
var filterUnstableRevis = Filter(FeatureSetByPortalItem(Portal('https://mass-eoeea.maps.arcgis.com'), '12345x', 3, ['R_Point_Status', 'R_CGP_File_Number'], true), "R_Point_Status = 'Unstable'");
var UnstableRevis = GroupBy(filterUnstableRevis,
["R_CGP_File_Number"],
[
{name: "unstablerevis", expression: "R_Point_Status", statistic: "count"},
]
);
// Create an empty dictionary to hold the data
var combinedDict = {
fields: [
{name: "File_Number", type: "esriFieldTypeString"},
{name: "Pt_Status", type: "esriFieldTypeString"},
{name: "Num_Inspections", type: "esriFieldTypeInteger"},
{name: "Watershed", type: "esriFieldTypeString"},
],
geometryType: "",
features: [],
};
// Feature set for watershed intersection
var watersheds = FeatureSetByPortalItem(Portal('https://mass-eoeea.maps.arcgis.com'), '4a7abb05f6eb42d78e31587b05e3ebec', 0, ['Label_Field'], false);
var watershed = First(Intersects(combinedDict,watersheds));
// Fill the new dictionary with data
var i = 0;
// Loop through features and parse them into appropriate fields within dictionary
// Stable point inspections
for (var m in StablePts) {
combinedDict.features[i] = {
attributes: {
File_Number: m["SV_CGP_File_Number"],
Pt_Status: "Stable",
Num_Inspections: m["stable"],
Watershed: m[watershed],
}],
},
};
i++;
}
// Unstable point inspections
for (var n in UnstablePts) {
combinedDict.features[i] = {
attributes: {
File_Number: n["SV_CGP_File_Number"],
Pt_Status: "Unstable",
Num_Inspections: n["unstable"],
},
};
i++;
}
// General observation points
for (var q in ObsPts) {
combinedDict.features[i] = {
attributes: {
File_Number: q["SV_CGP_File_Number"],
Pt_Status: "General Observation",
Num_Inspections: q["observation"],
},
};
i++;
}
// Stable revisit records (table)
for (var o in StableRevis) {
combinedDict.features[i] = {
attributes: {
File_Number: o["R_CGP_File_Number"],
Pt_Status: "Stable Revisit",
Num_Inspections: o["stablerevis"],
},
};
i++;
}
// Unstable revisit records (table)
for (var p in UnstableRevis) {
combinedDict.features[i] = {
attributes: {
File_Number: p["R_CGP_File_Number"],
Pt_Status: "Unstable Revisit",
Num_Inspections: p["unstablerevis"],
},
};
i++;
}
return FeatureSet(Text(combinedDict)); Any help would be appreciated. I've never tried this in a data expression with GroupBy statements before and feel like I am missing something fundamental here. Thank you,
... View more
05-01-2023
08:29 AM
|
0
|
7
|
1060
|
POST
|
Hi @SeanKMcGinnis - great news! Is there anything that I need to do to my existing flows that use the ArcGIS Connector to take advantage of the extended token life?
... View more
04-19-2023
12:08 PM
|
1
|
2
|
269
|
POST
|
Hi - I've seen many posts about scale-based symbology using Arcade (e.g. change the point size). I was wondering if it was possible to control a layer's transparency via Arcade so that a layer becomes more transparent as a user zooms in on a map. Currently, I have two copies of the same layer in my map - one is opaque and the other is semi-transparent. As the user zooms in on the map, the opaque version disappears and is 'replaced' by the semi-transparent version. Ideally, I'd like to use Arcade to change the transparency of a single layer as the user zooms in. This would help immensely as I am using my map in Experience Builder and the filter widget can only be applied to one layer. Any advice would be appreciated,
... View more
04-19-2023
12:01 PM
|
0
|
3
|
820
|
IDEA
|
This functionality is needed ASAP to provide a seamless user experience in applications where the same layer may be duplicated at different scale levels with different symbology.
... View more
04-19-2023
11:00 AM
|
0
|
0
|
1167
|
IDEA
|
This functionality is needed ASAP to provide a seamless user experience in applications where the same layer may be duplicated at different scale levels with different symbology.
... View more
04-19-2023
11:00 AM
|
0
|
0
|
1868
|
IDEA
|
I've been trying to figure out why this wasn't being honored in my web form, which I am also using within a Dashboard. I agree that it would be nice to prevent additions and deletions within a repeat in a web form. I do want users to be able to update information in an existing repeat record (e.g. expand on brief field notes), but not to add or delete repeat records.
... View more
04-13-2023
05:49 AM
|
0
|
0
|
455
|
POST
|
Hi @SeanKMcGinnis - any update on the ETA for this in US GCC?
... View more
03-31-2023
09:51 AM
|
0
|
0
|
689
|
IDEA
|
It would be nice to generate a word cloud in a Dashboard. Specifically I would be interested in having the flexibility to do this for a text field (free text), "select one" or "select multiple" (and have the ability to parse commas - even using Arcade to do this would be fine).
... View more
03-14-2023
12:27 PM
|
0
|
0
|
822
|
Title | Kudos | Posted |
---|---|---|
1 | 09-06-2022 11:53 AM | |
1 | 01-17-2024 05:18 AM | |
1 | 08-08-2022 12:50 PM | |
6 | 02-08-2024 12:57 PM | |
1 | 02-08-2024 01:00 PM |
Online Status |
Offline
|
Date Last Visited |
a week ago
|