cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Zango
Level: Powered On

Manipulating all SharePoint list data

Hi,

 

I am trying to create a trends list that should collate totals from a couple of different lists that I can fill periodically (every week or every month or so).

 

I wrote some javascript to test I knew what I wanted to get from the rest api and manipulated the data like I wanted ready to post back and create a new item in the trends list.

 

I have tried to rewrite this using MSFlow but seem to be having some performance issues.

 

First i initialize a variable called NextLink with the rest query for all items (if more than 100 items it returns a nextLink parameter which I use to replace this)

I also initialize a variable for an empty array

initialising.PNG

Then I start a do until condition because I want to put all items into the array not just the first 100

In this do until I use the "Send an HTTP request to sharepoint" action as a get request with my NextLink variable as the Uri.

httprequest.PNG

 

Here I parse the JSON body then use an Apply to each condition to push all items into my array

 

After this I use a condition to check the nextLink property from the items.

 

If its null i set my NextLink variable to be "nolink" (this is the the text i am checking for in the do until)

 

if it is set to a value I know I need to make another request with this new NextLink

I use a compse function to format this into the string that needs to go into the Send an HTTP request to SharePoint as it has to be just the rest call not the full link that the property provides, then set my NextLink

nextlink.PNG

 

When the do until is complete I show the array to see that I have all the data, and I do which is great.

 

The overview of the flow if it helps looks like this

overview.png

 

HOWEVER it is taking more than 10 minutes to run this flow, it takes seconds in js 

 

time.PNG

 

Am I doing something wrong or is this just a limitation of flow?

2 REPLIES 2
Community Support Team
Community Support Team

Re: Manipulating all SharePoint list data

Hi @Zango ,

 

If Flow run successfully, you could try to configure Settings in Apply to each to shorten the execution time.

Image reference:

4.PNG5.PNG

Hope it helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Zango
Level: Powered On

Re: Manipulating all SharePoint list data

Unfortunately this hasn't helped - with the parrallel option on and set to 50 it has upped the duration even more Smiley Surprised

 

parralel.PNG

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 276 members 5,187 guests
Please welcome our newest community members: