AnsweredAssumed Answered

Calculate Field - VB - Conditional If,elseif statement... not working?!

Question asked by monodh on May 4, 2012
Latest reply on May 4, 2012 by monodh

Wihtin model builder I have used the field calculator, to try and populate a new empty field (called Water_Classification) based on the contents of another field. However, my VB statement is not working and I am unable to figure out why? If anybody can help, it would be much appreciated :)

I would like to put numeric values in a field called [Water_Classification] depending on what the string values are from another field called [CLASSIFICATION_1]

This is what I currently have:

If [CLASSIFICATION_1] = "High" then
   x =5
ElseIf [CLASSIFICATION_1] = "Medium" then
   x =3
ElseIf [CLASSIFICATION_1] = "Low" then
   x =1
ElseIf [CLASSIFICATION_1] = "<null>" then
   x =0
   x = 9999

At the end (in the box at the bottom), I have: Water_Classification = x

If anybody has any advice or tips, pelase let me know,