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.
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]
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:
I guess an expression for each output could solve this?
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.
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1