Solved! Go to Solution.
Okay so I got it working once I added def Reclass but now the table is automatically filling in the field with the domain code description that corresponds with the percentages. Is there a way to correct this so it puts in the percentages instead?
def Reclass(variable1): if variable1 == 2: return "50pct" ....
Hi Meredith,
Are you receiving any errors?
When you create the new field, are you creating it as a "TEXT" field? If it is a Long Integer, Short Integer, or Double try the following w/o the quotes around the value:def Reclass(variable1): if variable1 == 2: return "50pct" ....
The new field is a text field with a length of 6. The final field that I'm trying to reclassify has to be a text field with a length of six. When I process I don't see any error messages but I also don't see any change in the table.
You did not provide your expression. It needs to contain the field name of the field with the original values you are evaluating and the calculation needs to be done on the field that will have the reclassified values. Something like:
def Reclass(!RETURN_PER!)
Okay so I got it working once I added def Reclass but now the table is automatically filling in the field with the domain code description that corresponds with the percentages. Is there a way to correct this so it puts in the percentages instead?
Give an example of what would you want it to appear like. Are you saying you want it to appear as 50pct, but it appears as something else? Removing the domain from the field is the easiest way to get it to show the native value you calculated. Otherwise you would have to alter the domain descriptions to appear the way you want (even if the value and the description are identical to each other).