web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / What to do with GetIte...
Power Automate
Unanswered

What to do with GetItems (Sharepoint)

(0) ShareShare
ReportReport
Posted on by 9

(Sorry for the silly question but I'm new to this and struggling to find an answer.)

 

I am trying to find the ID of a record matching specific criteria. I have used GetItems, with a filter, which should be finding the right record. But how do I actually process the information from there?

 

I want to find the ID of the (top) record, and set it to a variable for later use. I just don't know how to do it ... I know it must seem elementary...

 

TIA

Alex

Categories:
I have the same question (0)
  • Ryan_B Profile Picture
    446 on at
    Re: What to do with GetItems (Sharepoint)

    When you say you're using Get items with a filter, are you referring to the Filter query section of the action? If so, what is your filter and how are you trying to find a specific record? What are your qualifiers?

  • Verified answer
    ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at
    Re: What to do with GetItems (Sharepoint)

    Hi @AlexS2023 

     

    You can write an expression to get the Id of the first record obtained from "Get items" action. The Id can be collected in compose action or variable. In the below example, I have used compose action and check if there is any records returned by "Get items" action. If there is no records then in compose, we will put zero else we store the Id of the top or first record:

    ManishSolanki_1-1694011547367.png

     

    Expressions need to be entered in the expression box as highlighted in the above screenshot. Expression used for getting the Id of first or top record is:

    if(greater(length(outputs('Get_items')?['body/value']),0),first(outputs('Get_items')?['body/value'])?['Id'],0)

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard