Closed (works as designed)
Project:
Rules
Version:
7.x-2.0
Component:
Rules Core
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
24 Jan 2012 at 18:08 UTC
Updated:
27 Nov 2018 at 22:35 UTC
Jump to comment: Most recent
Comments
Comment #1
vladimirausI have the same issue.
That's because calculate is decimal value and I'm trying to set it to Integer.
Is there way around it?
Comment #2
guy_schneerson commentedi am using it with two decimal values and a (-) operation
i can use the result in the data selector of the next action (by selecting it from the dropdown).
hope this helps.
Comment #3
mudds commentedThank you guy schneerson.
I had the same problem and that helped.
Comment #4
Lloyd commentedI think this is related. I have an action to Calculate a value. I've entered a variable name to use. i then want to create an additional action to put the calculated value into a data field.
I create the new action called Set a Data Value. I select the field that I want the variable to be stored into. But I cannot select the variable as the data to be stored in the field.
Comment #5
Anonymous (not verified) commentedYou might want to try the new type conversion actions, see current dev-release.
Comment #6
mitchell commentedI started a section in the handbook on Data calculations, conversions, & transformations. It's very early in development, so if you'd like to work the info here and some of your experiences into that section, by all means, make any changes you like. Thanks!
Comment #7
sreekanth1201 commentedHi,
I have a non shippable product with price $15..I need docs from the customer.I arranged a pickup facility for my customer that charges more $3.When enables the pickup facility the charge will be 15+3=$18.
I tried above above use case using rules, by following
1)event - "before saving the cart item"
2)condition - "Entity has field pick up"
In action i am looking for price in the dataselector so that i can add $3 to the price.But i couldn't able find my custom content types.
Comment #8
tr commented@guy_schneerson gave the solution. Be aware that the data selector will only show values where the type matches what is required for the input. So if your calculated value is an integer and you are trying to use that as text input, then you will have to convert the data type first as mentioned by @Shnapoo. Alternatively, you can use direct input instead of the data selector, and use the token for the calculation result.