Here is the situation and what I want to do:
- Users have a "days left" field of type integer.
- A user will set a date range while creating a "time off" content type.
- When he hits the save button, a rule will intercept, subtract the date range from his "days left" field and save the result as the new "days left" value.
here is what I have done:
- user clicks save button rule intercepts
- action - gets the duration and divides it by 86400 (to convert it to days from seconds)
- action - converts the result to integer
- action - subtracts the converted value from content authors "days left" field.
At this point I want to assign the result of the subtraction to the author's "days left" field. The node:author:field-days-left variable is available and I select it. But the result of the subtraction is not.
I also tried to convert the result of the subtraction to integer and then assign it, but it did not work too.
Any ideas why?