Quantcast
Channel: Data Preparation & Blending discussions
Viewing all articles
Browse latest Browse all 4999

Error using Substring in Formula Tool

$
0
0

I am new to the tool.  I am trying to use the Formula tool to read a Substring and create a new field with the result.  I am getting the error that the field is not contained in the record (Expression #2).  The input field is defined as a V_String.  I tried to create the new output field as a boolean and as a v_string.  I get the same error either way.  I tried the starts with function as well.  No luck.  

 

IF Substring([CLASS_CODE],1,5) = "43101" then 1
ELSEIF Substring([CLASS_CODE],1,6) = "439951" then 1
ELSEIF Substring([CLASS_CODE],1,6) = "439952" then 1
ELSEIF Substring([CLASS_CODE],1,6) = "439953" then 1

ELSEIF Substring([CLASS_CODE],1,6) = "439954" then 1

ELSEIF Substring([CLASS_CODE],1,2) = "65" then 1
ELSE 0
ENDIF

 

Any help would be greatly appreciated!

 

Thanks,

Jill


Viewing all articles
Browse latest Browse all 4999