Hello fellow Flow makers !
I have a pretty big flow used to copy some pages from a Company site to several (23 and up) Branches sites.
The branches sites are referenced in a list stored in the Company site's content. It contains the URL of the site, the Title (more user-friendly) and a multi-valued managed-metadata column.
For each item found in the BranchSites list, it will copy the original page to the SitePages library, search for the managed metadata column's hidden internal name in the library, then it will copy the page and edit some metadatas (as the multivalued managed metadata column and the PromotedState) using sometimes HTTP requests using REST. The copy action is the standard one from SharePoint
But this action is a bit too slow : 29min for 23 copies.
As you can see, this is a straight flow, and each copy can not be launch if the previous one's steps are not fulfilled.
So, when my customer told me that he wanted to prioritize the branches (for example, the Group page is published in Western Europe. The USA are nearly awoken at that time, but the Chinese are not. So, he wants that when a page is published, the USA branch has to see it first, and the Chinese branch to be the latest).
So, I have added a choice column called Priority in my BranchesSites list, with just "1" or "2".
I added a parallel branch to retrieve the items depending on their Priority.
so I have the following :
I have copied every action i'm doing to copy the page and edit its metadatas.
Except, I have came to a pretty and logic trouble :
I am using the same variables in both parallel branch.
So, of course, it went wrong. Because my variables are not synchronized and used in both case.
I will try to create separated variables for each branch, but do you have any idea to optimize my flow ?
Because I have 5 to 6 different variables to double. And my first steps of the flow will be too long, because i'm already initializing 11 variables, i will have 17 variables at the beginning !
Do you have any idea on how i could optimize these variables a bit (like, i don't know, sort of concataining ?) ?
Thanks a lot !
Have a nice day 🙂
Hi @Gaelle before I start going to far down the route of parallel branches, did you try changing the concurrency setting of the loop? By default it wil do one loop, then the next, and so on. If you make it concurrent, it will process multiple entries in one go, so you should be able to do all countries in a matter of seconds as opposed to minutes.
To find this option, click on the options ellipsis for your Apply to Each action, and then select Settings. Toggle the Concurrency Control to on and then up the degree of parallelism to be enough to do all your countries in one.
If that still doesn't cover what you want to do, then I'll build myself a demo with variables in parralel branches and see what I can do 🙂
If you have found this post useful, please give it a thumbs up. If it has answered your question, please accept it as the solution so others can benefit.
Community Leader: Black Country PowerApps & Flow User Group
Hello @MattWeston365 !
Yes, I already set my "Apply to each" loop to be launched at the same time.
But throwing all my actions at the same time causes my Variables to be so wrongly set !
I am uses the same variables for each item, so if the actions are done at the same time, i will have wrong values.
What is happening :
I want to copy one page from Corporate Group intranet's SitePages library (https://mygroup.sharepoint.com/sites/Group-Intranet/SitePages/Title1.aspx) to SitePages libraries of both my Branch Sites, the variable "SitePagesID" is set to be France's when I want to use Japan's.
So, I don't really know how to do that.
Check out the announcement of Power Platform content at Microsoft Ignite!
Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.
Features releasing from October 2020 through March 2021