ERROR 001841: the Class was not Found%s

1110
2
Jump to solution
05-13-2021 02:42 PM
Labels (1)
JimWilliams
New Contributor III

Hello,

I see there are a few other questions about his error, but I didn't see anything telling me what the really is causing the issues here. I am using a view in a attribute rule to get a feature set that I use a filter on to get a subset. 

  • Can I use a view in a attribute rule, or does featuresetbyname work for a view? 
  • What does "Class was not Found%s" mean? Is this a feature class that is not found, are there null values in the attribute rule? 
var quad = $feature.Quadrant;

if ($feature.Quadrant != null) {
    var System_valve_set = filter(featuresetbyname($datastore, 'Valve', ['OBJECTID', 'WATERVALVETURNING_STATUS', 'GRID_NUM'], true), Concatenate(["GRID_NUM = ", quad], ''))
    var Valves_Exercised_This_Year = filter(featuresetbyname($datastore, 'Valve_Exercised_This_Year', ['OBJECTID', 'Status', 'GRID_NUM'], true), Concatenate(["GRID_NUM = ", quad], ''))
    var cnt = count(System_valve_set)

    // make the query for each possible situation where there could be a feature set that is null
    if (Valves_Exercised_This_Year != null && cnt > 0) {
        var query = "Status = 'Closed'"
        var System_closed_valve_set = filter(Valves_Exercised_This_Year, query)
        var result = count(System_valve_set) - count(System_closed_valve_set)
        return result

    }
    else { return null }
}
else { return null }

regards, 

Jim

0 Kudos
1 Solution
2 Replies
JimWilliams
New Contributor III

Hey Dan,

Thank you helping me out again. The first link you shared with me was correct. Removing the comments resolved the issue. Now I just get a error saying it cant find the view. I will assume that you cant use views in Arcade. 

The link to the BUG just for reference:

BUG-000126594: Attribute rule returns the error, "Error 001841: The.. (esri.com)

Regards, 

Jim

0 Kudos