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 / The output you selecte...
Power Automate
Unanswered

The output you selected is inside a collection and needs to be looped over to be accessed.

(0) ShareShare
ReportReport
Posted on by 90

I am working on creating a flow which gets a list using D365 Finance entity. I am limiting the query to get me top 1 record and need to grab value of single object and pass back to PowerApp.

 

raoraheel_0-1594933009495.png

When I us 'Respond to a PowerApp or Flow' to pass that value, I get this error below. 

The output you selected is inside a collection and needs to be looped over to be accessed. This action cannot be inside a foreach.
What will be the way to grab that value and pass to powerapp without running into this error? In screenshot below, 'Balance' value is what i want to grab. 

 

raoraheel_0-1594933872093.png

 

Categories:
I have the same question (0)
  • MJain Profile Picture
    2,450 on at

    Hi @raoraheel ,

     

    In order to use the Balance field value from the output returned 

     

    outputs('YourActionName')?['body/value/Balance']

     

    your action name should be replaced with "List Items present in table"

     

    Thanks

  • Ed Gonzales Profile Picture
    4,531 Most Valuable Professional on at

    @ManishJain  - I wonder if even though there is only one result, that it being in an array is triggering the error?  Not sure, but @raoraheel if you still get the error, try putting Manish's expression in a compose before returning it to PowerApps, but wrap the thing in a first() - something like this:  first(outputs('YourActionName'))?['Balance']

     

    Essentially, you might need to use the same tricks @benitezhere uses in this video:

     

     

    Keep us posted.

    -Ed

     

    If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

  • Verified answer
    MJain Profile Picture
    2,450 on at

    Hi @raoraheel ,

     

    Since this is list records it returns array . sorry my bad I hit the enter soon realizing that first should be used 

     

    first(outputs('YourActionName')?['body/value'])?['Balance']

     

    Thanks

  • raoraheel Profile Picture
    90 on at

    @ManishJain I get this error when I use that. Do you see what i'm doing wrong?

     

    raoraheel_0-1594935722493.png

    outputs('Lists items present in table')?['body/value/Balance']
  • raoraheel Profile Picture
    90 on at

    This worked! Thanks Manish!

  • sandile7003 Profile Picture
    2 on at

    I am working on creating a flow which get values from an AI builder that extract information from invoices. I want to get values and use it in my power apps application. But then I encounter an error when I try to get the description of the invoice.

    The error is "The output you selected is inside a collection and needs to be looped over to be accessed. This action cannot be inside a foreach.

     

    and I am stuck on how to fix the issue. Please help

    flow.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

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