Hello All, and thanks for any help.
I am trying to take this block of Python and insert it into the Field Calculator. What it is supposed to do is take a concatenated field (LF_Concat) and from within that field parse out the number of Greens (G), Yellows (Y), and Reds (R) and then apply a If/Than/elif to number of colors.
Right now I am at a loss on how to get it in. I have this too show for it. The parser while it shows VB is actually in Python (I maybe slow, but I ain't that slow)
I suspect that the delineatorList should be changed to the concatenated field (LF_concat) but I am lost beyond that.
delineatorList = [" ", ".", ","]
ColorClass = ['GGGY','GGYY','GYYR']
for letters in ColorClass:
#print letters, " G = ", letters.count('G')
#print letters, " Y = ", letters.count('Y')
#print letters, " R = ", letters.count('R')
Count_G = letters.count('G')
Count_Y = letters.count('Y')
Count_R = letters.count('R')
if Count_R > 0:
elif Count_R == 0 and Count_Y >= Count_G:
elif Count_R == 0 and Count_Y < Count_G: