In ExB I'd like to count the number of features where the condition met is true. I have a number of features with a text field called "Is an Issue Flagged?". If the value is "Yes" (i.e True) then I'd like to count them. So if I have 6 features with the field Is an Issue Flagged = "Yes" I'd put a 6 in a dynamic text box.
Here is my expression that doesn't work: IF {Is an Issue Flagged?} = "Yes" THEN COUNT({ObjectID}) END
Thanks in advance.
GR
Solved! Go to Solution.
The approach is likely not an arcade solution but the approach you presented is perfect. I did actually use views in ExB and counted items from there. I was just trying to skip that step. Thanks you.
Where is this calculation in the experience? If you are able to use Arcade, I saw this Geonet response that filtered by the field and I think you could do something similar.
alternatively,
var fc = FeatureSetBYName($datastore, "layername", ["Is an issue flagged"], True);
var cnt = 0;
for (var yes in fc) {
if (yes.is an issue lagged == "yes") {
cnt += 1;
}
}
return cnt;
I based the above off of a solution here: https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-arcade-filter-function-issue/td-p/...
The approach is likely not an arcade solution but the approach you presented is perfect. I did actually use views in ExB and counted items from there. I was just trying to skip that step. Thanks you.
ExB doesn't have much in terms of expressions. Certainly not conditional statements. Data source views are (currently) the only way to accomplish this.