This has to be asked somewhere already, but I don't know the right words to find or frame it. So please bear with me.
This code fragment:
code = 'VegCode'
d = {}
codes = foo_func
for item in codes:
print item.code
Results in:
RuntimeError: Row: Field code does not exist
if I change it like this, it will work, but I don't want to hard code the variable name:
for item in codes:
print item.VegCode
How do I pass the value of code
to the item
object instead of it's name? (and please tell me what key words would have led to an answer!)