Skip to main content
edited tags
Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345
Updated for 2014
Source Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

"If then" VB Script If/then VBScript/Python code (or Python) equivalent to SQL'sSQL IN ('x','y',z') expression in ArcGIS Field Calculator question?

we need just like the following, only with multiple records selected... have tried the "xyz" in (1,2,3,4,5) SQL code but of course VB Script wants something else.

dim f2
if [field1] = "foo" then
  f2 = "bar"
end if

Screen shot of this being used in the field calculator.alt text  

enter image description here

"If then" VB Script code (or Python) equivalent to SQL's IN ('x','y',z') expression in ArcGIS Field Calculator question?

we need just like the following, only with multiple records selected... have tried the "xyz" in (1,2,3,4,5) SQL code but of course VB Script wants something else.

dim f2
if [field1] = "foo" then
  f2 = "bar"
end if

Screen shot of this being used in the field calculator.alt text enter image description here

If/then VBScript/Python code equivalent to SQL IN ('x','y',z') expression in ArcGIS Field Calculator?

we need just like the following, only with multiple records selected... have tried the "xyz" in (1,2,3,4,5) SQL code but of course VB Script wants something else.

dim f2
if [field1] = "foo" then
  f2 = "bar"
end if

Screen shot of this being used in the field calculator. 

enter image description here

edited tags
Link
matt wilkie
  • 28.3k
  • 35
  • 149
  • 283
fix code formatting
Source Link
matt wilkie
  • 28.3k
  • 35
  • 149
  • 283
Loading
Source Link
sirgeo
  • 2.1k
  • 5
  • 33
  • 45
Loading