โ01-26-2022 07:04 PM
When defining new variables, sometimes it is necessary to define VariableONE, and then define VariableTWO as something that was dependant on the results of VariableONE. For Example:
VariableONE = "ABC"
VariableTWO = VariableOne + "DEF"
I know that you can do this in two separate tasks, but I was wondering if this could be done within one task since you can create multiple variables within on task.
โ01-27-2022 12:29 AM
can be done but the result is not what you want. Since variableONE is being initialized and default value supplied in the same step , variableONE does not get the value till the step completes. Not sure what could be the use case for this - in the same step?
โ01-27-2022 12:31 AM
The use case... if i am extracting a piece of data into a variable that will be reused, and then I want to use that same varialbe to build another variable as well. IF i have to do this in two tasks, it proliferates tasks. I want to reduce the task load.
โ01-27-2022 12:39 AM
ok understand. Based on my test , VariableONE will still be nil or null till that step completes but maybe there are other ways.. BTW , if you have a really large recipe with lot of steps, try breaking it into multiple callable functions - modular.
โ02-10-2023 06:19 AM
@tshoemaker if this isn't already an Idea, you should submit it b/c I've wished for the same, and lamented the fact that I had to spend extra tasks for it.
https://ideas.workato.com/app/#/user/suggest?currentProductId=caf1efdf-1d7e-4b7b-aeb9-28e4b0f4b25c