My programming is really rusty at this point, and I am trying to do a simple calculation using a Codeblock, either VB or Python is fine. I have tried about 50 different variations on same theme, and get a runtime error every time.
Here's a screenshot of my Field Calculator. Basically, Field !Items! contains a string of all items separated by a comma, and I am trying to create new fields that contain a "y" if that item is present in !Items!, in this case it's "Baby Items". It is always capitalized like so, no need to worry about case mismatch.
def calc (items)
if items.find("Baby Items") != -1:
return "y"
calc (!Items!)