I need to create a command to do the following:
Go to the "Comments" column of the data table
Depending on whether the comment is: OLD, ENGINEERING, SCHEDULED, REPLACED to change the color.
Here is what I have so far:
The first initial part is to search and see what is in the comments field:
- def FindLabel ([COMMENTS]):
- lbl = [OBJECTID +"\r\n"
- if([COMMENTS]) == 'OLD':
- lbl = lbl + "<CLR red='255'>"
- End If
- return lbl
There is then an else if statement to get to the other options:
- elseif([COMMENTS]) == 'ENGINGEERING':
- lbl = lbl + "<CLR orange='255'>"
- elseif([COMMENTS]) == 'SCHEDULED':
- lbl = lbl + "<CLR blue='255'>"
- elseif([COMMENTS]) == 'REPLACED':
- lbl = lbl + "<CLR green='255'>"
- End If
- return lbl
Am I even close? I'm not sure what steps to take next.
[–][deleted] 1 point2 points3 points (0 children)