POST
|
Your logic works using this testing data, so I would use @Ehei_Dogen's suggestion to use Console (use the Run button to see the results in the Arcade window) to see what's not working // Replace with your actual Portal item IDs
var fuelItemID = "774019f31f8549c39b5c72f149bbe74e"; // states
var compItemID = "5f31109b46d541da86119bd4cf213848"; // zip codes
// Access both layers
var fuelLayer = FeatureSetByPortalItem(Portal("https://www.arcgis.com"), fuelItemID, 0, ["STATE_ABBR", "STATE_FIPS"],false);
console(fuelLayer)
var compLayer = FeatureSetByPortalItem(Portal("https://www.arcgis.com"), compItemID, 3, ["State", "POPULATION", "ZIP_CODE"],false);
console(compLayer)
// Array to store joined features
var joinedFeatures = [];
// Join loop
for (var fuel in fuelLayer) {
console(fuel["STATE_ABBR"])
var lid = fuel["STATE_ABBR"];
var match = First(Filter(compLayer, "State = @lid"));
if (!IsEmpty(match)) {
console(match["POPULATION"])
var attributes = {
COMPNO: fuel["STATE_FIPS"],
FUELLOADS: match["POPULATION"],
Plantation: match["ZIP_CODE"]
};
Push(joinedFeatures, {
attributes: attributes
});
}
}
// Define output FeatureSet schema
var fields = [
{ name: "COMPNO", type: "esriFieldTypeString" },
{ name: "FUELLOADS", type: "esriFieldTypeInteger" },
{ name: "Plantation", type: "esriFieldTypeString" },
{ name: "District", type: "esriFieldTypeString" },
{ name: "SuperDistrict", type: "esriFieldTypeString" }
];
// Return a proper FeatureSet
return FeatureSet({
fields: fields,
geometryType: "",
features: joinedFeatures
});
... View more
Friday
|
0
|
0
|
19
|
POST
|
You can use the results of the first Replace in a second Replace Replace(Replace([ALIAS],"CO-",""),"E-","")
... View more
a week ago
|
0
|
0
|
74
|
POST
|
Experience Builder also uses URL parameters. Look at the Data-related parameters section to see how to configure it to zoom to your selected feature
... View more
2 weeks ago
|
1
|
4
|
141
|
POST
|
You can submit corrections and feedback about Esri Basemaps here.
... View more
2 weeks ago
|
0
|
0
|
125
|
POST
|
I'm referring to a text element like this: The expression used in that element just has a text return, not an object return var label = "This is a test"
return label
... View more
2 weeks ago
|
1
|
1
|
104
|
POST
|
You can use the $map variable in AGOL if you're referring to a featureset in the current map. If featureset is not in your map, then you have to retrieve it using FeatureSetByPortalItem.
... View more
2 weeks ago
|
0
|
0
|
115
|
POST
|
If this a simple text element, you don't need to return an object. For an Arcade element (or a chart), you will need to return an object.
... View more
2 weeks ago
|
0
|
3
|
119
|
POST
|
This will remove "MDU " from your string if it contains it. Otherwise, the original string will be returned var label = $feature.MDU_NAME
return iif(Left(label, 4) == 'MDU ', Mid(label, 4), label);
... View more
2 weeks ago
|
2
|
0
|
106
|
POST
|
The Combobox component is designed for multiple selections and uses those icon for selections in the multiple-selection mode. Can you use the Select component instead?
... View more
2 weeks ago
|
0
|
1
|
73
|
POST
|
You have to replace the single quotation mark with two single quotation marks (the first one is used as an escape character). var qf = new SpatialQueryFilter();
qf.FilterGeometry = myShape;
qf.SpatialRelationship = SpatialRelationship.Intersects;
qf.WhereClause = $"{AllFieldnames.parcelNumFieldname} = '{intersctedParcelNum.Replace("'","''")}'";
... View more
2 weeks ago
|
3
|
0
|
96
|
POST
|
You can add multiple statistics to the GroupBy function. This will return the latest and earliest inspections for each hydrant. However, this does not include dates that are null GroupBy(inspections , 'HydrantID', [{name: 'Latest', expression: 'dateinspected', statistic: 'MAX'},{name: 'Earliest', expression: 'dateinspected', statistic: 'MIN'}])
... View more
3 weeks ago
|
1
|
1
|
118
|
POST
|
Give this a try var activities = GroupBy(fil2, 'RecType', [{ name: 'NumTypes', expression: 'RecType', statistic: 'COUNT' }, {name: 'Icon', expression: 'iconPath', statistic: 'Min' }]) You can use the Min and Max statistics on string fields. In your case, each would give the same result, since the paths are the same for each RecType.
... View more
3 weeks ago
|
1
|
1
|
115
|
POST
|
Do you have a timeline when the CSS utility classes will be upgraded to Bootstrap 5.x, since 4.3.x was originally released in 2019 and 5.0 was released in 2021?
... View more
3 weeks ago
|
0
|
1
|
118
|
Title | Kudos | Posted |
---|---|---|
1 | 09-05-2024 11:49 AM | |
1 | 2 weeks ago | |
2 | 2 weeks ago | |
1 | 2 weeks ago | |
3 | 2 weeks ago |
Online Status |
Offline
|
Date Last Visited |
Friday
|