cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
max81
Kudo Kingpin
Kudo Kingpin

SharePoint GetItems TopCount

According to the Connector documentation, the "GetItems" operation with the "Top Count" parameter retriebes by default all items.

But the dev-documentation telling something else.

2021-02-23_15-59-54.png
https://docs.microsoft.com/en-us/connectors/sharepointonline/#get-items

 

2021-02-23_16-02-45.png

https://docs.microsoft.com/en-us/sharepoint/dev/business-apps/power-automate/guidance/working-with-g...

1 ACCEPTED SOLUTION

Accepted Solutions
6 REPLIES 6
manuelstgomes
Super User II
Super User II

Hi @max81 

 

You're correct. If you don't define any value, the Get ITems will fetch the first 100. If you want to fetch more, you need to enable paging. To do that:

Screenshot 2021-02-25 at 08.30.37.pngScreenshot 2021-02-25 at 08.30.27.png

You can define the threshold (number of items per page), but I want to highlight the description:

"Retrieve items to meet the specified threshold by following the continuation token. Due to connector's page size, the number returned may exceed the threshold."

 

Can you please check if and let me know if you have any questions?

 

Cheers
Manuel

-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

max81
Kudo Kingpin
Kudo Kingpin

@manuelstgomes thanks.

I know that "paginaging" option.

But still the documentation is not correct.

Also there is no possibility with this action to get more than 5000 items back, because there is no "nextlink" in the response.

That's why I use the _api from SharePoint (Send HTTP request to SharePoint-action) to get all items back, if I have to - but that's not so easy to use for our standard "citizen developer".

manuelstgomes
Super User II
Super User II

HI @max81 

 

It's a lot of data indeed. I'm sure you thought about this, but is there a way you can segment the data. For example, do multiple fetches based on time periods or any other field in your data that could break things down into smaller pieces?

 

I know this could be too much, but you can even think about breaking into groups of 1000 based on the ID number. I know this is trying to do pagination "by hand", but if it's not working with the "next link," we need to figure out a workaround. 

 

Cheers
Manuel

-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

I have several workarounds, depending on the business case:
• Filtering with ODATA
• Using the "Send Http Request to Sharepoint" with _api to get all list items (and then I get also a "nextlink")

My problem is, that I think the documentation is wrong and that should be fixed. I got users that ask me that and I also saw some users with this question here in the community.

manuelstgomes
Super User II
Super User II

HI @max81 

 

You're right. Having good documentation is essential. I would submit a bug so that Microsoft can take care of that.

https://powerusers.microsoft.com/t5/I-Found-A-Bug/bd-p/BugFound

 

It's well worth to correct

 

Cheers
Manuel

-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

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

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.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

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.

Users online (37,799)