Hi there!
I've been scouring the community, dev resources, and Pro's Help section but can't find a solution to my problem. I have a custom expression in Arcade to assign labels. I would like to be able to simply write in this same expression assigned colors for each label. This would be simple enough normally, however, I'm combining 3 or more fields based on their results so attribute symbology (I don't think) is an option. Is there anyway possible I can just write in an RGB/hex value into the expression instead of creating new fields or doing a ton of individual work arounds? I have 44 symbol classes and I'd like to avoid doing a ton of manual entries for this.
Here's the expression I'm using currently:
var pt1 = $feature.Points_1
var pt2 = $feature.Points_2
var pt3 = $feature.Points_3
if (pt1 == 0 && pt2 == 0 && pt3 == 0){
return "None"
}
else if (pt1 >= 1 && pt2 >= 1 && pt3 >= 1){
return Concatenate($feature.Trtmt_1 + ", " + $feature.Trtmt_2 + ", " + $feature.Trtmt_3 + " - " + (pt1 + pt2 + pt3))
}
else if (pt1 >= 1 && pt2 >= 1 && pt3 == 0){
return Concatenate($feature.Trtmt_1 + ", " + $feature.Trtmt_2 + " - " + (pt1 + pt2))
}
else if (pt1 >= 1 && pt2 == 0 && pt3 >= 1){
return Concatenate($feature.Trtmt_1 + ", " + $feature.Trtmt_3 + " - " + (pt1 + pt3))
}
else if (pt1 == 0 && pt2 >= 1 && pt3 >= 1){
return Concatenate($feature.Trtmt_2 + ", " + $feature.Trtmt_3 + " - " + (pt2 + pt3))
}
if (pt1 == 0 && pt2 == 0 && pt3 == 0){
return "None";
}
else if (pt1 == 1 && pt2 == 0 && pt3 == 0){
return "Overlay - 1";
}
else if (pt1 == 1.5 && pt2 == 0 && pt3 == 0){
return "Overlay - 1.5";
}
else if (pt1 == 2 && pt2 == 0 && pt3 == 0){
return "Overlay - 2";
}
else if (pt1 == 2.5 && pt2 == 0 && pt3 == 0){
return "Overlay - 2.5";
}
else if (pt1 == 3 && pt2 == 0 && pt3 == 0){
return "Overlay - 3";
}
else if (pt1 == 3.5 && pt2 == 0 && pt3 == 0){
return "Overlay - 3.5";
}
else if (pt1 == 4 && pt2 == 0 && pt3 == 0){
return "Overlay - 4";
}
else if (pt1 == 4.5 && pt2 == 0 && pt3 == 0){
return "Overlay - 4.5";
}
else if (pt1 == 5 && pt2 == 0 && pt3 == 0){
return "Overlay - 5";
}
else if (pt1 == 5.5 && pt2 == 0 && pt3 == 0){
return "Overlay - 5.5";
}
else if (pt1 == 6 && pt2 == 0 && pt3 == 0){
return "Overlay - 6";
}
else if (pt1 == 6.5 && pt2 == 0 && pt3 == 0){
return "Overlay - 6.5";
}
else if (pt1 == 7 && pt2 == 0 && pt3 == 0){
return "Overlay - 7";
}
else if (pt1 == 7.5 && pt2 == 0 && pt3 == 0){
return "Overlay - 7.5";
}
else if (pt2 == 8 && pt2 == 0 && pt3 == 0){
return "Overlay - 8";
}
else if (pt1 == 8.5 && pt2 == 0 && pt3 == 0){
return "Overlay - 8.5";
}
else if (pt1 == 9 && pt2 == 0 && pt3 == 0){
return "Overlay - 9";
}
else if (pt1 == 9.5 && pt2 == 0 && pt3 == 0){
return "Overlay - 9.5";
}
else if (pt1 == 10 && pt2 == 0 && pt3 == 0){
return "Overlay - 10";
}
else if (pt1 == 10.5 && pt2 == 0 && pt3 == 0){
return "Overlay - 10.5";
}
else if (pt2 == 1 && pt1 == 0 && pt3 == 0){
return "Seal - 1";
}
else if (pt2 == 1.5 && pt1 == 0 && pt3 == 0){
return "Seal - 1.5";
}
else if (pt2 == 2 && pt1 == 0 && pt3 == 0){
return "Seal - 2";
}
else if (pt2 == 2.5 && pt1 == 0 && pt3 == 0){
return "Seal - 2.5";
}
else if (pt2 == 3 && pt1 == 0 && pt3 == 0){
return "Seal - 3";
}
else if (pt2 == 3.5 && pt1 == 0 && pt3 == 0){
return "Seal - 3.5";
}
else if (pt2 == 4 && pt1 == 0 && pt3 == 0){
return "Seal - 4";
}
else if (pt2 == 4.5 && pt1 == 0 && pt3 == 0){
return "Seal - 4.5";
}
else if (pt2 == 5 && pt1 == 0 && pt3 == 0){
return "Seal - 5";
}
else if (pt2 == 5.5 && pt1 == 0 && pt3 == 0){
return "Seal - 5.5";
}
else if (pt2 == 6 && pt1 == 0 && pt3 == 0){
return "Seal - 6";
}
else if (pt2 == 6.5 && pt1 == 0 && pt3 == 0){
return "Seal - 6.5";
}
else if (pt2 == 7 && pt1 == 0 && pt3 == 0){
return "Seal - 7";
}
else if (pt2 == 7.5 && pt1 == 0 && pt3 == 0){
return "Seal - 7.5";
}
else if (pt2 == 8 && pt1 == 0 && pt3 == 0){
return "Seal - 8";
}
else if (pt2 == 8.5 && pt1 == 0 && pt3 == 0){
return "Seal - 8.5";
}
else if (pt2 == 9 && pt1 == 0 && pt3 == 0){
return "Seal - 9";
}
else if (pt2 == 9.5 && pt1 == 0 && pt3 == 0){
return "Seal - 9.5";
}
else if (pt2 == 10 && pt1 == 0 && pt3 == 0){
return "Seal - 10";
}
else if (pt2 == 10.5 && pt1 == 0 && pt3 == 0){
return "Seal - 10.5";
}
else if (pt3 == 1 && pt1 == 0 && pt2 == 0){
return "Crack Fill - 1";
}
else if (pt3 == 1.5 && pt1 == 0 && pt2 == 0){
return "Crack Fill - 1.5";
}
else if (pt3 == 2 && pt1 == 0 && pt2 == 0){
return "Crack Fill - 2";
}
else if (pt3 == 2.5 && pt1 == 0 && pt2 == 0){
return "Crack Fill - 2.5";
}
else if (pt3 == 3 && pt1 == 0 && pt2 == 0){
return "Crack Fill - 3";
}
else if (pt3 == 3.5 && pt1 == 0 && pt2 == 0){
return "Crack Fill - 3.5";
}
else if (pt3 == 4 && pt1 == 0 && pt2 == 0){
return "Crack Fill - 4";
}
else if (pt3 == 4.5 && pt1 == 0 && pt2 == 0){
return "Crack Fill - 4.5";
}
else if (pt3 == 5 && pt1 == 0 && pt2 == 0){
return "Crack Fill - 5";
}
else if (pt3 == 5.5 && pt1 == 0 && pt2 == 0){
return "Crack Fill - 5.5";
}
else if (pt3 == 6 && pt1 == 0 && pt2 == 0){
return "Crack Fill - 6";
}
else if (pt3 == 6.5 && pt1 == 0 && pt2 == 0){
return "Crack Fill - 6.5";
}
else if (pt3 == 7 && pt1 == 0 && pt2 == 0){
return "Crack Fill - 7";
}
else if (pt3 == 7.5 && pt1 == 0 && pt2 == 0){
return "Crack Fill - 7.5";
}
else if (pt3 == 8 && pt1 == 0 && pt2 == 0){
return "Crack Fill - 8";
}
else if (pt3 == 8.5 && pt1 == 0 && pt2 == 0){
return "Crack Fill - 8.5";
}
else if (pt3 == 9 && pt1 == 0 && pt2 == 0){
return "Crack Fill - 9";
}
else if (pt3 == 9.5 && pt1 == 0 && pt2 == 0){
return "Crack Fill - 9.5";
}
else if (pt3 == 10 && pt1 == 0 && pt2 == 0){
return "Crack Fill - 10";
}
else if (pt3 == 10.5 && pt1 == 0 && pt2 == 0){
return "Crack Fill - 10.5";
}