Hello! I am relatively new to arcade and dashboards. I am trying to work around that FieldMaps doesn't allow users to choose more than one option for a collection ie a feature collection can only have "flying dumping" not "fly dumping" AND "water discharge".
I have created three separate fields that can be collected per feature to account for this "encroachment-type-1", "encroachment-type-2", and "encroachment-type'3". In addition users can collect this information as a point, line, or polygon (all housed in group feature layer) based on what is most appropriate.
I want to pull a count of each encroachment type across the 3 layers.
Here's an example of my code to get a count for the first encroachment type "mowing (turf grass)". How could this be improved? It is showing that the first Filter() function is invalid and beyond that idk if it will run.
var EPointCountMowing= Filter(
FeatureSetByPortalItem(
portal,
"itemID",
0,
[
"Encroachment_Type_1",
"Encroachment_Type_2",
"Encroachment_Type_3"
],
false
),
"Encroachment_Type_1" = 'Mowing (turf grass)' OR "Encroachment_Type_2" = 'Mowing (turf grass)' OR "Encroachment_Type_3" = 'Mowing (turf grass)');
var ELineCountMowing = Filter(
FeatureSetByPortalItem(
portal,
"itemID",
1,
[
"Encroachment_Type_1",
"Encroachment_Type_2",
"Encroachment_Type_3"
],
false
),
"Encroachment_Type_1" = 'Mowing (turf grass)' OR "Encroachment_Type_2" = 'Mowing (turf grass)' OR "Encroachment_Type_3" = 'Mowing (turf grass)');
var EAreaCountMowing = Filter(
FeatureSetByPortalItem(
portal,
"itemID",
2,
[
"Encroachment_Type_1",
"Encroachment_Type_2",
"Encroachment_Type_3"
],
false
),
"Encroachment_Type_1" = 'Mowing (turf grass)' OR "Encroachment_Type_2" = 'Mowing (turf grass)' OR "Encroachment_Type_3" = 'Mowing (turf grass)');
var MowingCount = Count(EPointCountMowing) + Count(ELineCountMowing) + Count (EAreaCountMowing)
return MowingCount