The only way I've managed to set fields of integer type based on the webform submission data is via the following method:

Action: Create a variable of type 'text' - set the initial value to be the relevant field from the webform
Action: Convert a value - the above provided variable to type 'integer'
Action: Set a value - now possible to choose the provided result as the data selector

This seems to be the case because it's not possible to use tokens when selecting 'direct input', there's just a select drop down with static numbers to choose from.

Has anyone found an easier way to accomplish this? Think it may be more of an issue with the Rules module but I thought I would share in case others are having trouble with the same task

Comments

mjcarter’s picture

Title: Setting Integer values seems excessively complicated » Setting Integer values from webform data is overly complicated
mjcarter’s picture

Title: Setting Integer values from webform data is overly complicated » Setting Integer values from webform data seems overly complicated
johnhanley’s picture

This is an old issue, but still relevant. That is, how to use tokens when creating an integer variable. The short answer is: you can't. As the mjcarter described above, you must first "Add a variable" as text and then "Convert data type" to an integer.

This method works fine for one or two variable definitions, but is tedious and bulky for multiple variable assignments. It would be better if one could simply use tokens or a component value from $data when assigning an integer variable value.