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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Separating search resu...
Power Automate
Unanswered

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

 

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    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

  • Frigge__ Profile Picture
    32 on at

    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

     

     

  • Verified answer
    Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    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

    Thank you @Expiscornovus !

    That worked great! 😀

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard