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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Returning Value from F...
Power Apps
Answered

Returning Value from Flow within ForAll

(0) ShareShare
ReportReport
Posted on by 21

Hi,

 

Powerapps rookie here... I have the following code in my submit button and want to return the value from power automate.

 

ForAll(colCameraImages As mycollection,
App_Grid.Run({contentBytes: mycollection.Value,name:mycollection.Id}
,mycollection.Crew,
mycollection.SlipType,Right(mycollection.ServiceOrder,6),
Text(mycollection.Crew_Date,"YYYY-MM-DD"),
"WE "&Text(DateValue(mycollection.Crew_Date),"mm-dd-yy")));Reset(SearchBox);Reset(Gallery1);
Clear(colCameraImages);Reset(Radio1);Reset(ListBox1);

 

 

Screenshot 2023-01-26 220709.png

How do I adjust the code to return the response value as I like to show it in a text box in the app? Many thanks!

Categories:
  • PatilChetan Profile Picture
    on at
  • Verified answer
    EddieE Profile Picture
    4,650 Moderator on at

    @weebot 

    You could try setting a variable to get your responses into a table, something like

    Set(
     flowReturn,
     ForAll(colCameraImages As mycollection,
     App_Grid.Run(
     {contentBytes: mycollection.Value,name:mycollection.Id},
     mycollection.Crew, mycollection.SlipType, Right(mycollection.ServiceOrder,6),
     Text(mycollection.Crew_Date,"YYYY-MM-DD"), 
     "WE "&Text(DateValue(mycollection.Crew_Date),"mm-dd-yy")
     )
     )
    );
    Reset(SearchBox);Reset(Gallery1);
    Clear(colCameraImages);
    Reset(Radio1);Reset(ListBox1);

     

    In your Flow, add a second response parameter called "itemid" and set it to the mycollection.Id value from PowerApps.

     

    What gets returned is a Table which you can add to a gallery to view it's contents or add to a label and add this code to the Text property see the contents

    Concat(flowReturn, itemid & "_" & response & ", ")

     

    You can then use this data as you want inside your app

  • weebot Profile Picture
    21 on at

    Thanks all!

    @EddieE - very helpful. I was stuck on where to place the set function and the concat was helpful to know! Working for me now!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard