Skip to main content

Notifications

Power Automate - Building Flows
Answered

Skipping top 300 from get items

Posted on by 287
hi,
 
I need to skip first 300 list items with sharepoint get items. is it possible?
  • Verified answer
    zbegumdost Profile Picture
    zbegumdost 287 on at
    Skipping top 300 from get items
     
    hi,
    skip(outputs('Get_items')?['body/value'], 300) function is working. thank you for your support. :)
  • Suggested answer
    David_MA Profile Picture
    David_MA 7,550 on at
    Skipping top 300 from get items
    That should be possible. One question, do you delete items from the list? If not, then just add a filter query where ID gt 300.
     
    If items can be deleted, you'll use a similar filter query, but you will need to calculate the number for the gt condition. To do that:
    • Add an integer variable and name it FilterValue
    • Add a Get items action to your list and sort it by ID asc and limit it to returning 300 items
    • Add a condition and use a length expression to check that 300 items were returned.
      • ​​​​​​​If less than 300 items are returned, then no exclusion is required.
      • This isn't needed if you know your list already has more than 300 items.
    • Add a Set variable action and set the FilterValue to the value of the 300th item.
      • This expression should work: int(body('Get_items')?['value'][299]?['ID'])
    • You can then add another Get items action and filter it to where ID gt FilterValue
    I have not tested this, but it should work. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,532

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,050

Leaderboard