Select to view content in your preferred language

Question Selection Breaking Expressions

134
3
Monday
OKDOTGIS
Emerging Contributor

Hello all, hoping you can help me with an issue I am having with some calculated fields.  Essentially, ALL of the expressions fail to calculate if a question is marked a certain way, even though none of the questions are related/reliant on that question.

Inspection Status = ‘Not Inspected’ --> all expressions works

Inspection Status = ‘Inspected’ --> none of the expressions work, they just show loading forever.

The Inspection Status field is NOT a calculated field, it is a required Combo Box question.

The questions that are filled in via expressions will fill in and calculate correctly if Inspection Status = NULL or Inspection Status = Not Inspected. As soon as you turn Inspected Status = Inspected, then all of the calculations break.

Here is one of the calculations that is breaking when the Inspection Status question is set to Inspected:

var districts = FeatureSetByName($map, "Maintenance Districts", ["MAINTENANCE_DIV"], true)

var district = First(Intersects(districts, $feature))

if (!IsEmpty(district)) {
    return district.MAINTENANCE_DIV
} else {
    return null
}
 
Tags (2)
0 Kudos
3 Replies
AlfredBaldenweck
MVP Regular Contributor

I think it'd be helpful to see one of the condition statements on one of the questions that's breaking

0 Kudos
CodyPatterson
MVP Regular Contributor

Hey @OKDOTGIS 

I would post an example if possible as Alfred Baldenweck had mentioned, but also, would it be a possibility that your status may be a coded domain? Inspected may be INSP or something similar, you could check the domain in the feature layer by going to the layer itself, Data, Fields, and then select the fields. If this is on a EGDB or similar you can check it that way as well!

Cody

0 Kudos
OKDOTGIS
Emerging Contributor

I have edited to the post to add an example calculation that is breaking. As you can see, it does not involve the Inspected Status at all.

It is not a coded domain, the only acceptable answers are "Inspected" and "Not Inspected".

0 Kudos