Field actions and math error - Zoho quick start guide

Field actions and math error - Zoho quick start guide

I'm new to Zoho and am following the quick start guide to build some sample apps and forms. I'm having trouble with an exercise in the Configure Field actions part ( https://www.zoho.com/creator/help/getting-started/quick-start-guide.html#field_actions):

I'm getting an error in the app when I put the following:

Revenue = input.Units_Sold * rec.unit_price;

I tried with Revenue and input.Revenue
The script is accepted without error, but when I run the app, the revenue field throws the error:

error executing set variable task... unable to update template variable revenue
unable to perform operation * over operand 99 (units sold) and null

Can anyone tell me what's wrong?

Your kind help is appreciated :)