I'm working on arcade label expression to show suite numbers vs the civic number if its a condo complex.
I could not figure out what's wrong with my expression, but the same logic expression works in arc map.
any insight will be appreciated.
The expression is :
IIf(IsEmpty($feature.UNIT_NUM), $feature.CIVIC_NUM, $feature.UNIT_NUM)
VB Label expression in arcmap is :
Function FindLabel ( [CIVIC_NUM], [UNIT_NUM] )
if ( [UNIT_NUM] <> "<Null>" ) then
FindLabel = [UNIT_NUM]
else
FindLabel = [CIVIC_NUM]
end if
End Function
Would any be able to shed some light on how to achieve this.
Thanks in advance
Solved! Go to Solution.
Just wondering, does the field UNIT_NUM contain a string "<Null>" or is it really empty? If it is empty you van use this and see what it does. The Console statements will print the values to the console and allows you to check if it is correct:
var CivicNum = $feature.CIVIC_NUM;
var UnitNum = $feature.UNIT_NUM;
Console("CIVIC_NUM:" + CivicNum);
Console("UNIT_NUM :" + UnitNum);
var label = "Err";
if (UnitNum != null) {
label = UnitNum;
} else {
label = CivicNum;
}
return label;
Hello!1
I tried the expression but still no luck!!
It labels only the unit numbers but not he civic's when unit numbers are null.
Also, The unit number field has empty values and not string <Null>.
Tried the expression condition to <No value> as that's what the detailed view shows on ArcGIS Online item details.
Hi Bhanu,
Are you able to share the web map?
-Kelly
Hello Kelly,
here is a link to the web map
https://airdrie.maps.arcgis.com/home/item.html?id=0357842fa6ba41e490a3ed40a3c5ebb8
I have an expression as mentioned above in the map as Address Label.
Thanks for taking time to look into this
appreciate it !!
Bhanu
Hi Bhanu,
The blank value of your unit numbers is a space and not a null value. If you change null to " " the labels will appear.
var CivicNum = $feature.CIVIC_NUM;
var UnitNum = $feature.UNIT_NUM;
Console("CIVIC_NUM:" + CivicNum);
Console("UNIT_NUM :" + UnitNum);
var label = "Err";
if (UnitNum != " ") {
label = UnitNum;
} else {
label = CivicNum;
}
return label;
-Kelly
That is fantastic !!
Thank you so much for your insight and helping me figure what the error was .
Thanks again !!
That explains why I couldn't filter values that are blank ,as it had the space all along .
Hi Bhanu Vedula , glad that KGerrow-esristaff could resolve your problem. Can you mark her answer as the correct one?
Thanks!