Rules -> Action -> Calculate a value does not receive the value of the field field-number.

Events
After saving new content

Conditions
Content is of type
Parameter: Content: [node], Content types: Number

Actions
Calculate a value
Parameter: Input value 1: [node:field-number], Input value 2: 1
Provides variables: Calculation result (result)
Set a data value
Parameter: Data: [node:field-number], Value: [result]

Reports -> Recent log messages
Warning: The variable or parameter input_1 is empty.

Comments

Yuri’s picture

Issue summary: View changes

I had the same error message, and the reason was that the input value was not zero, but empty: the field did not yet have a value.
Apparently Rules does not handle empty values the same as zero in calculations.

TR’s picture

Status: Needs work » Fixed

This was answered long ago by #1.

Apparently Rules does not handle empty values the same as zero in calculations.

So you can either configure your field to have a default value, or you can add a condition to your Rule to check that field-number has a value before you use it.

TR’s picture

Status: Fixed » Closed (fixed)