|
POST
|
You can use the ArcGIS Assistant to change the datasource. I would recommend trying it out on a copy of your webmap to make sure it's making the change correctly, since you're editing the underlying JSON file that powers the webmap. Start by reading the instruction guide.
... View more
12-12-2025
06:14 AM
|
0
|
0
|
378
|
|
POST
|
And as an aside, didn't the sample pages used to have a feedback mechanism, similar to the "Was this page helpful?" link in the lower right corner in the API reference pages? Clicking Yes or No provided a dialog so you could send an email about an issue on the page.
... View more
12-11-2025
07:26 AM
|
0
|
0
|
506
|
|
POST
|
Have you checked the distance attribute for those other features? You'll only get returns if the values exactly match 200, 400, or 600.
... View more
12-09-2025
11:07 AM
|
0
|
0
|
658
|
|
POST
|
When posting code, please use the "Insert/edit code sample" button. This makes it easier to read or copy your code. You can create a single feature from the roadlessIntersect FeatureSet and using that in the intersection with the speciesRanges FeatureSet. To do this, loop through the FeatureSet and add the features to an array. Use the Union function to create the single feature from that array. var roadlessIntersect = Intersects(RoadlessRule, $feature)
var features = []
for (var f in roadlessIntersect) {
Push(features, f)
}
var roadlessFeature = Union(features)
var speciesIntersect = Intersects(speciesRanges, roadlessFeature)
... View more
12-04-2025
08:22 AM
|
0
|
0
|
269
|
|
POST
|
Esri can be frustrating like that sometimes! What was the final solution? You should click the "Accept as Solution" button in the post with the correct solution (even it was yours!). This will help others search for the same sort of answer.
... View more
12-04-2025
06:09 AM
|
0
|
0
|
826
|
|
POST
|
The variable substitution sqlExpression in line 39 is not correct. You'd have to do something like this var globalId = p.globalid
var related = Filter(comments, "projectguid = @globalId");
... View more
11-18-2025
12:30 PM
|
1
|
1
|
691
|
|
POST
|
You can add an Arcade Element to your popup with this code. It loops through each field in the feature and returns only the fields that contain a value. This also includes a variable (exceptedFields) that contains fields you don't want to show in the field list. Note that those field names are case sensitive. Expects($feature, "*");
var fields = Schema($feature).fields;
var attributes = {};
var fieldInfos = [];
var exceptedFields = ["OBJECTID", "GlobalID"]; //case sensitive!
for (var f of fields) {
if (!Includes(exceptedFields, f.name)) {
if (Trim($feature[f.name]) != "") {
attributes[f.alias] = $feature[f.name];
Push(fieldInfos, { fieldName: f.alias });
}
}
}
return { type: "fields", fieldInfos: fieldInfos, attributes: attributes };
... View more
11-18-2025
06:53 AM
|
2
|
1
|
601
|
|
POST
|
You can use the GroupBy function to calculate this var fs = FeatureSetByPortalItem(
Portal("https://www.arcgis.com"),
"yourID",
0,
['County','Year', 'curr_enr','prev_enr'],
false
)
GroupBy(fs, ['County','Year','curr_enr','prev_enr'], {name: 'Change', expression: '(curr_enr - prev_enr)/prev_enr', statistic: 'Max'})
... View more
11-17-2025
07:00 AM
|
1
|
1
|
1172
|
|
POST
|
Also note that you can make the When statement more concise var tod = When(hour >= 0 && hour <= 5, "Night",
hour <= 8, "Morning",
hour <= 15, "Day",
hour <= 23, "Evening",
Null
);
... View more
11-17-2025
06:38 AM
|
1
|
1
|
1088
|
|
POST
|
Are you viewing this in Firefox? There have been reports of some issues with Firefox v145.0 That said, I'm seeing the Preview button on my machine using ExB DE 1.18 in both Firefox and Chrome.
... View more
11-14-2025
08:35 AM
|
0
|
2
|
854
|
|
POST
|
You can write a function that returns the color for the attribute passed in as a parameter. function bgColor(attribute) {
when (attribute <= 70, "red",
attribute <= 80, "orange",
attribute <= 90, "yellow",
attribute <= 95, "green",
"blue")
}
//in use
var theColor = bgColor($feature.attribute)
... View more
11-14-2025
07:57 AM
|
1
|
0
|
337
|
|
POST
|
It seems like there are some incompatibilities with the latest version of Firefox and Esri's products https://community.esri.com/t5/community-feedback/map-viewer-issues-when-using-firefox-version-145-0/m-p/1665688#M6016 https://community.esri.com/t5/arcgis-enterprise-portal-questions/issue-with-layer-widget-display-in-experience/m-p/1665001
... View more
11-14-2025
06:00 AM
|
0
|
1
|
848
|
|
POST
|
In the Indicator tab, turn off the Unit prefix option
... View more
11-14-2025
05:50 AM
|
3
|
0
|
767
|
|
POST
|
OK, this should give you what you're trying to do, but I haven't tested it. It loops through each tract, gets the intersecting lakes for that tract, then gets the intersecting area for each lake. Then it gets the total lake count. Note that the area is rounded to two decimal places. It will take a while to process. You could test whether "Memorizing" the tracts and lakes layers makes it any faster. var port = Portal("https://www.arcgis.com");
// Load layers
var tracts = FeatureSetByPortalItem(port, "b9fcbedac0384e32bc3dba6aec1a8cf6", 0);
var lakes = FeatureSetByPortalItem(port, "5564b2e702364aefba08df8c95216a1f", 0, ["OrgKeyID"]);
var lakesfilt = Filter(lakes, "OrgKeyID > 0");
var totalAcres = 0;
var arrTracts = [];
for (var tract in tracts) {
var intersectingLakes = Intersects(lakesfilt, tract);
Push(arrTracts, tract);
for (var intersectingLake in intersectingLakes) {
var lakePart = Intersection(tract, intersectingLake);
totalAcres += Area(lakePart, "acres");
}
}
var lakeCount = Count(Intersects(lakesfilt, Union(arrTracts)))
return FeatureSet(
{
fields: [
{ name: "LakeCount", type: "esriFieldTypeInteger" },
{ name: "Acres", type: "esriFieldTypeDouble" }
],
features: [
{ attributes: { LakeCount: lakeCount, Acres: Round(totalAcres, 2) } }
]
}
);
... View more
11-13-2025
01:27 PM
|
1
|
1
|
1212
|
|
POST
|
I guess I'm not clear on the number you're expecting to get for the total area. Do you want to sum up the area of the portion of each lake that intersect the each tract? If so, then you'll have to loop through each tract and each lake to get the Intersection geometry and add its area to the total. However, the total count of the lakes will likely be incorrect, since a lake intersecting several tracts will be counted for each tract.
... View more
11-13-2025
12:59 PM
|
0
|
3
|
1217
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | a week ago | |
| 1 | a month ago | |
| 1 | 4 weeks ago | |
| 1 | 10-11-2023 06:18 AM | |
| 1 | 03-23-2026 09:23 AM |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|