I have a workflow that has three branches, which will have more. In each of the branches I keep asking for the same information example LastName, date, etc... Can I use the same variables in each branch, instead of creating variables that look like this:
Each of the run parallel action branches look like the png file I attached.
I have to make three more of these branch's and it would be nice if I could do it a bit easier than I currently am.
There could be many ways of work with that. I think in the following approach:
-Add your LastNames (and all other information to other collections) to a collection
-Then loop the LastNamesCollection
-get the information of the other collections based on the current index of the looped one
-Do your magic
-Close the loop
When you say: "In each of the branches I keep asking for the same information"
Do you mean that each branch has a Task Form or some other means of input in which User Data will be collected and can change based on whoever is entering / providing said data during the lifecycle of the Workflow?
If that's the case you could literally just hookup something on the form to your Workflow variable so that it'll capture after every instance of where a user could interact with it.
However, if for some reason you can get this information without having users do anything meaningful, you could always just either grab it as soon as the workflow starts (that way if it restarts, no big deal), or simply overwrite the data inside of those workflow variables with whatever *should* be there every branch.
You could also create a State Branch that handles this, and is activated after every point in your workflow where you need this to happen.
I hope some of that helps. It's difficult to say without seeing more of what your workflow is doing or how you're getting any of the information, but I can't imagine that it'll be too difficult to find a solution.
There are no task actions, it's just pulling data from one list and then putting it into an HTML email.
If you're just pulling in X amount of data from a list, then like Fernando suggested above, throw it into a collection variable and parse them via a loop.
if all the branches do the same, I'd suggest to move whole branch logic to a separate (site) workflow.
then within each branch you just start separate instance of the workflow and (may) handover it a parameter(s) whom should it collect data for.
in my opinion the best way would be to collect all the relevant items in a "Query List" action and collect IDs in a collection varibale. Then you can use a "For Each" action to get the data from each item and put it into collection variables which you can use for further activities...