cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Zango
Advocate II
Advocate II

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
v-bacao-msft
Community Support
Community Support

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.

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

 

parralel.PNG

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (41,297)