Arcade Expressions, Conditionals and PopUps

1663
2
Jump to solution
12-06-2018 02:11 PM
deleted-user-jxpbpbjlZInj
Occasional Contributor

I have a hosted feature layer where there are two fields I'm concerned with: Status and Assignment_Type

The status can be reported, assigned or completed. If it's assigned, then an assignment type is given. I want the popup to display the Assignment_Type only when the Status field = "Assigned"

I have written:

If($feature.Status=='Assigned'){

return ($feature.Assignment_Type)

}

else{

return ""

}

However, the Assignment_Type shows up unconditionally!  What am I doing wrong?

0 Kudos
1 Solution

Accepted Solutions
deleted-user-jxpbpbjlZInj
Occasional Contributor

Oh I was over-complicating it! For anyone else that may come across this thread, I would like to add that additionally, I needed there to be a bit of text prior to the attribute so my final expression was the following:

IIf($feature.Status=='Assigned', "Action Assigned: " + $feature.Assignment_Type, "")

Thank you for your help.

View solution in original post

2 Replies
KellyGerrow
Esri Frequent Contributor

try this:

IIf($feature.Status=='Assigned', $feature.Assignment_Type, "")

Logical Functions | ArcGIS for Developers 

https://community.esri.com/community/gis/web-gis/arcgisonline/blog/2017/07/18/conditional-field-disp... 

IF this doesn't work, can you share your map?

-Kelly

deleted-user-jxpbpbjlZInj
Occasional Contributor

Oh I was over-complicating it! For anyone else that may come across this thread, I would like to add that additionally, I needed there to be a bit of text prior to the attribute so my final expression was the following:

IIf($feature.Status=='Assigned', "Action Assigned: " + $feature.Assignment_Type, "")

Thank you for your help.