Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Separating search results from a sharepoint list

(0) ShareShare
ReportReport
Posted on by 32

Hi, 

I've set up a virtual agent that looks through a Sharepoint list for URLs. 

The input to the flow is a short word. There are no problems finding possible matches in the list and returning them as one string. but that looks very messy.

 

SO...

Is there a way to separate the "search result" and return the top 3 matches? I have an array with the result after the "apply to each" loop. 

I'm guessing it is possible to do with a JSON, but I can't figure it out or find anything that might help me. 

Frigge___0-1662023323087.png

 

  • Frigge__ Profile Picture
    32 on at
    Re: Separating search results from a sharepoint list

    Thank you @Expiscornovus !

    That worked great! 😀

  • Verified answer
    Expiscornovus Profile Picture
    32,155 Most Valuable Professional on at
    Re: Separating search results from a sharepoint list

    Hi @Frigge__,

     

    In that setup you could also use indexes to refer to specific items of your array

     

    Try something like below in your output variables of your last action. 

    I assume the body is from the Parse Json action, correct?

     

    OutputRes1

    body('Parse_JSON')[0]

     

    Outputres2

    body('Parse_JSON')[1]

     

    Outputres3

    body('Parse_JSON')[2]

     

  • Frigge__ Profile Picture
    32 on at
    Re: Separating search results from a sharepoint list

    Hi,
    It's a "Get Item" action. 
    I can get the result as an array but I'd like to get 3 separate results from the Apply to each loop. 

    Like the output in this picture:

    Frigge___0-1662028111292.png

     

    I guess an expression for each output could solve this? 

    Frigge___1-1662028586617.png

     

     

  • Expiscornovus Profile Picture
    32,155 Most Valuable Professional on at
    Re: Separating search results from a sharepoint list

    Hi @Frigge__,

     

    What type of SharePoint action are you using for the Get Objects one? (second action).

     

    If it is a Get Items action you could simply use the Top Count field listed under the advanced options.

     

    top3_results.png

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1