Actions in parallel rather than in series but also to make it look tidier we'll then look at how you can annotate Expressions to document them and finally I'll show you how you can.
Turn on and off an experimental feature with a new expression editor and have a look at whether that's actually worth doing or not but that's enough of looking at me I'm.
Going to hand over to my non-avatar persona and let's get started so in order to be able to follow along with this tutorial you'll need to have.
Done the previous one on variables and arrays but that's a good thing to do anyway you'll need a really good understanding of variables to carry on with the rest of the tutorials in this.
Series so what I'd like to do now is to tidy up the flow we got as a result of completing the previous tutorial and in particular what I'd like to do is do two.
Things firstly everything in this section is to do with OneDrive so what I'm doing is getting the list of OneDrive files collapsing the array storing that array and then counting how.
Many items there are in it right it's all to do with OneDrive and likewise if I scroll down a bit you can see that the next set of four tasks are all to do is SharePoint so I'd like to do the same.
Thing for that and what that would do essentially is group the task together into a single what's called a scope action which I'll then be able to expand and contract to.
See the contents and it's very easy doing this so let's let's have a go doing it rather strangely the way you add a scope action is adding a new task and then drag everything into it so I.
Can put this step in anywhere I like it seems most sensible to do it just above the actions I want to group so I can click on that and choose to add an action and what I'm looking for is.
- Export bulk data to flat file or .txt - Oledb C# .NET E22
- Retrieve or Read Data from Database - Oledb .NET E06
- ID Card Design In MS Word Create Employees Identity Card in Microsoft Word Word
The unique scope action - ID Card Make
So I can add that in and what I'm inclined to do is to rename that immediately and say it's OneDrive actions.And then I can simply drag all my tasks in I don't think from memory there's a way to do them more than one at a time.
I think you have to drag them in individually I'm nearly there and now that I've done that and collapse it so I can just click on the title bar and it collapses it and.
Makes the whole flow much easier to read so now I'm going to do exactly the same thing with the SharePoint ones I'll add another action again it's going to be Escape.
And select that rename it and this time I'll call it SharePoint actions and I can drag all my tasks up into that as well again I don't believe you can do it in a.
Group if you're welcome to try holding down the control key and seeing if it works I don't think it does and you can see my flow is much much more readable so I thoroughly recommend.
Scopes to you but they have one limitation you're probably screaming at me now saying why not group all these ones into a scope so everything up here.
Is to do with setting variables why not put those in the scope well it's such an important question I want to show you why I'm not doing it so what we're going to do is try adding a.
Scope remember the renaming it because this isn't going to work and I'm going to drag my first action to set a variable value into the scope I'm going to do.
That do that it will come up with a
Message and say an initialized variable action can only be a top level it's to do curiously or ironically enough with the scope of variables when.You set or initialize a variable you're creating it you're declaring it and it has to be what's called a public variable available throughout the rest of the flow.
If you put a variable in the scope it's only local to that scope and won't be visible elsewhere if that made no sense don't worry about it the upshot is that when you're.
Initializing variables you can't put them in a separate scope and it annoys me intensely because it means I've got to keep these six items at the top so I think there's six.
Actions initializing variables visible I won't be able to collapse them down and so I'm always going to be scrolling down to see the rest of my flow and there's nothing you can do about that I'm afraid.
So the next thing I'm going to do to improve my flow is to create something called a parallel branch at the moment I've got two sets of actions I'm getting the counting the.
OneDrive files and getting and Counting the SharePoint files and I'm doing it in sequence and that doesn't need to happen like that there's no reason why I should do the OneDrive files before the.
SharePoint files it would be far better if I gave control to my computer to decide in which order this happens so what I'm going to do is create a separate path for the SharePoint actions.
To add in a parallel Branch you just click above the where you want to create the branch and add a new step and add a parallel branch and there's two ways you can do this neither of which quite.
Floats my boat what I'll do is I'll show you both of them so you can decide for your self which one you prefer so the first thing I can do is ignore the fact I'm choosing to add another.
Operation here and drag my SharePoint actions carefully just above it and providing you've got that little plus symbol appearing on the mouse pointer which implies I'm copying it even though.
I'm actually moving it it will work what I'm then left with is a residual operation here which I just need to cancel so that's one way of doing it and I'll just quickly move that back if I.
May when I move it back it will get rid of the parallel Branch because it's no longer needed the other way you could do it is to create a parallel branch and then you.
Could go to your action which you want to move click on it and choose to copy to the clipboard you can then go to the new operation which has been created on the right hand.
Side go to my clipboard and paste that in what you'll then have to do though is to delete the original action and then you'll have to go in and rename.
The new one you've just created so on balance I think the first way is better so that's how you create a parallel Branch how do you carry on from it there's two ways in which you can add.
Another step you can either linger at the bottom of one of these parallel branches and insert a new step and if you do that it will be added within the parallel branch.
But when you want to reunite them you need to click the bottom button here new step and that will be added and at the bottom of the flow and reunite your parallel branches so that's what I'm.
Going to do now again what I need to do now is move this compose task but it brings information from both the two places and put it in my merged flow so I'm going to drag it.
There make sure I've got that little icon for copying and release the mouse button and once again I can now get rid of or cancel this last operation.
And I've completed my flow so why is that better well firstly I think it reads better it takes up less vertical remember the screen as I scroll up and down.
But also it's going to run more efficiently as I said I'll leave it up to my computer to decide whether to get information from OneDrive or SharePoint.
First it's probably going to be do both in parallel with what's called separate threads so if you run this flow you'll see it runs fractionally quicker than the.
Previous one so what we'll do now is show a way to annotate Expressions to make them easier to read to document your flow if you look on the OneDrive actions for.
Example at the bottom there's an action to count the number of OneDrive files and if you expand that you can see it contains an expression to count the length or get the length of the variable.
Called OneDrive files the only way I can actually see what that does is to linger over it to read it it would be nice if I could see it on screen permanently so this is a way to.
Achieve that in the expression the Syntax for it will come up in the expression box and what I can do is copy that not by right clicking and choosing copy because.
That's not supported on a browser or at least not in this browser so instead I'm going to press Ctrl C you're going to have to take my word that I just did that to copy it.
What I can then do is go back to my action and I can choose to add a note to it we did this briefly earlier in a previous tutorial so I can add in my short notes and I can.