I have the following VB Script expression for labeling, I am not getting the right blue color. I am using ArcGIS Pro, same expression worked just fine in ArcMap.
I would like some help converting it to Arcade or Python.
Function FindLabel ( [ABCDEFGH_New.DesceasedName],[ABCDEFGH_New.ownerName],[ABCDEFGH_New.all_spaceid] )
if (FindLabel = [ABCDEFGH_New.DesceasedName]<>"") then
FindLabel = "<CLR black='255'><FNT size = '6'>" + [ABCDEFGH_New.DesceasedName] + "</FNT></CLR>"+ vbnewline + "<CLR red='115' green='38' blue='0'><BOL>" +[ABCDEFGH_New.all_spaceid] + "</BOL></CLR>"
ElseIf (FindLabel =IsNull([ABCDEFGH_New.DesceasedName] ) )Then
FindLabel= "<CLR blue='255'><FNT size = '6'>" + [ABCDEFGH_New.ownerName] + "</FNT></CLR>" + vbnewline + "<CLR red='115' green='38' blue='0'><BOL>" +[ABCDEFGH_New.all_spaceid] + "</BOL></CLR>"
Else
FindLabel ="<CLR red='115' green='38' blue='0'><BOL>" +[ABCDEFGH_New.all_spaceid] + "</BOL></CLR>"
End If
End Function
Solved! Go to Solution.
You could try this with Arcade, although I don't have data to test this on:
var DesceasedName = $feature.DesceasedName;
var ownerName = $feature.ownerName;
var all_spaceid = $feature.all_spaceid;
var label = "";
if (DesceasedName != "") {
label = "<CLR black='255'><FNT size = '6'>" + DesceasedName + "</FNT></CLR>"+ TextFormatting.NewLine + "<CLR red='115' green='38' blue='0'><BOL>" + all_spaceid + "</BOL></CLR>";
} else if (IsEmpty(DesceasedName)) {
label = "<CLR blue='255'><FNT size = '6'>" + ownerName + "</FNT></CLR>" + TextFormatting.NewLine + "<CLR red='115' green='38' blue='0'><BOL>" + all_spaceid + "</BOL></CLR>";
} else {
label ="<CLR red='115' green='38' blue='0'><BOL>" + all_spaceid + "</BOL></CLR>";
}
return label;
You could try this with Arcade, although I don't have data to test this on:
var DesceasedName = $feature.DesceasedName;
var ownerName = $feature.ownerName;
var all_spaceid = $feature.all_spaceid;
var label = "";
if (DesceasedName != "") {
label = "<CLR black='255'><FNT size = '6'>" + DesceasedName + "</FNT></CLR>"+ TextFormatting.NewLine + "<CLR red='115' green='38' blue='0'><BOL>" + all_spaceid + "</BOL></CLR>";
} else if (IsEmpty(DesceasedName)) {
label = "<CLR blue='255'><FNT size = '6'>" + ownerName + "</FNT></CLR>" + TextFormatting.NewLine + "<CLR red='115' green='38' blue='0'><BOL>" + all_spaceid + "</BOL></CLR>";
} else {
label ="<CLR red='115' green='38' blue='0'><BOL>" + all_spaceid + "</BOL></CLR>";
}
return label;
Thank you .. it worked perfect.