I am still fairly new to coding so please excuse what may be simple mistakes.
I am working in ArcMap 10.5 and have an Overhead Conductor feature layer that I need to label based on what field (Conductor A, Conductor B, Conductor C, Conductor N, Construction Statuse) says what.
For example:
If Conductor A contains a value and Conductor B and C contain 'N/A' then the label for Overhead Conductors should display what is in the Conductor A field.
If Conductor B contains a value and Conductor A and C contain 'N/A' then the label for Overhead Conductors should display what is in the Conductor B field, and so on.
HOWEVER, the twist comes in when 'Construction Status' field contains a 'Proposed' status instead of an 'Installed' status. When this field has a 'Proposed' status I would like the label to be displayed in a larger, bold font.
I have included the original labeling expression and the expression of when I added what I hoped would make the font appear larger and bold when a 'Proposed' status was displayed in the 'Construction Status' field. I have also included a screen shot of how the fields appear in the attribute table.
The label expression format I am using is done in VBScript.
If anyone knows of an easier way to accomplish this in a different script I am open to suggestions but I am unfortunately stuck due to my lack of coding experience.
ORIGINAL EXPRESSION
Function FindLabel ( [conductora], [conductorb], [conductorc], [conductorn] )
dim a
if [conductora] <> "" and [conductora] <> "NA" then
a = a & [conductora]
elseif [conductorb] <> "" and [conductorb] <> "NA" then
a = a & [conductorb]
elseif [conductorc] <> "" and [conductorc] <> "NA"then
a = a & [conductorc]
elseif [conductorn] <> ""and [conductorn] <> "NA" then
a = a & [conductorn]
end if
FindLabel = a
End Function
MODIFIED EXPRESSION
Function FindLabel ( [conductora], [conductorb], [conductorc], [conductorn] )
dim a
if [conductora] <> "" and [conductora] <> "NA" then
a = a & [conductora]
elseif [conductorb] <> "" and [conductorb] <> "NA" then
a = a & [conductorb]
elseif [conductorc] <> "" and [conductorc] <> "NA"then
a = a & [conductorc]
elseif [conductorn] <> ""and [conductorn] <> "NA" then
a = a & [conductorn]
elseif [CONSTRUCTIONSTATUS] = "Proposed" AND [conductora] <> "" and [conductora] <> "NA" then
a = a & [conductora]
FindLabel = "<BOL><FNT size = '12'>" + a & [conductora] + "</BOL></FNT>"
elseif [CONSTRUCTIONSTATUS] ="Proposed" AND [conductorb] <> "" and [conductorb] <> "NA" then
a = a & [conductorb]
FindLabel = "<BOL><FNT = '12'>" + a & [conductorb] + "</BOL></FNT>"
elseif [CONSTRUCTIONSTATUS] ="Proposed" AND [conductorc] <> "" and [conductorc] <> "NA"then
a = a & [conductorc]
FindLabel = "<BOL><FNT = '12'>" + a & [conductorc] + "</BOL></FNT>"
elseif [CONSTRUCTIONSTATUS] ="Proposed" AND [conductorn] <> ""and [conductorn] <> "NA" then
a = a & [conductorn]
end if
FindLabel = a
End Function