vbscript calculator expression wildcard

1912
0
12-10-2013 01:21 PM
JerryHood
New Contributor
Hi all,

I have beating my head over this for two hours and for the life of me can't figure out the problem.  I am simply trying to populate a field [Tester] with a variable value based on values in another field [UNITBLDG].  I am seeking to glean this value from [UNITBLDG] with a like statement.  Please review the entire code block and expression for any errors in syntax or provide me with another method.  This is being performed in ArcGIS 10.1 on a file geodatabase.  All help will be greatly appreciated.  Thanks.

'Code Block:
dim aValue
if  [UNITBLDG] like '%-' then
aValue = "Unit"
Elseif [UNITBLDG] like '-%' then
aValue = "Bldg."
else
aValue = ""
end if

'expression:
aValue
0 Kudos
0 Replies