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.
Best Answer
If you like SQL, you can apply a Definition Query:
then process your field calculator results. Only the filtered records will be modified.
If you want Python, it will look similar to the SQL:
[Added as solution] Or as a 1-liner without any preprocessing required: