I am creating a new field - let's call it A (SHORT INTEGER) in shp file using Modelbuilder and I need to fill it it with the values from two different fields. First step is to fill field A with the values from field B (that's a string field which is partially empty). The next step is to change all of the values (in A) which are 0, with values from another field with the result of equation C/3. Normally I would select the 0 values in the table and execute normal field calculation, but I'd like to have it as one statement in modelbuilder. That's what I wrote so far in Python
def function(A,C): if (A == 0): A == (C/3) function(!A!,!C!)
I get the error that the field A is not nullable, but while creating it, the option is set to 'nullable'.