Select to view content in your preferred language

# Symbolize polygon using 7 fields

213
2
07-24-2024 09:19 AM
Labels (1)
Frequent Contributor

Hello -

I have a building layer that has 7 fields indicating the depth of flooding for each modeled design storm (1-yr, 2-yr, 5-yr, 10-yr, 25-yr, 50-year, and 100-yr). I would like to symbolize the layer based upon which design storm a building first begins to flood (depth>0). So for example, if depth at the 1-year <=0, depth at the 2-year<=0, but at the 5-year depth>0, then it would be symbolized as "5-Year". The symbology categories would be: 1-year, 2-year, 5-year, 10-year, 25-year, 50-year, 100-year. Is it possible to do something like this using an arcade expression without creating a new permanent field in my layer? I am working in Pro 3.3 and will publish the service to Portal.

Leila

Tags (3)
1 Solution

Accepted Solutions
by
MVP Esteemed Contributor

You can certainly use Arcade for this. Check out the function When:

``````return When(
\$feature['1-year']   > 0,   '1-year',
\$feature['2-year']   > 0,   '2-year',
\$feature['5-year']   > 0,   '5-year',
\$feature['10-year']  > 0,  '10-year',
\$feature['25-year']  > 0,  '25-year',
\$feature['50-year']  > 0,  '50-year',
\$feature['100-year'] > 0, '100-year',
'No Value'
)``````

Conditions evaluate in order, so by checking which field is greater than 0 in this order, as soon as one of the conditions evaluates as true, it returns the corresponding string.

- Josh Carlson
Kendall County GIS
2 Replies
by
MVP Esteemed Contributor

You can certainly use Arcade for this. Check out the function When:

``````return When(
\$feature['1-year']   > 0,   '1-year',
\$feature['2-year']   > 0,   '2-year',
\$feature['5-year']   > 0,   '5-year',
\$feature['10-year']  > 0,  '10-year',
\$feature['25-year']  > 0,  '25-year',
\$feature['50-year']  > 0,  '50-year',
\$feature['100-year'] > 0, '100-year',
'No Value'
)``````

Conditions evaluate in order, so by checking which field is greater than 0 in this order, as soon as one of the conditions evaluates as true, it returns the corresponding string.

- Josh Carlson
Kendall County GIS
Frequent Contributor

Thanks!