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.
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?
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.
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.
@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.