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 Automate / Collection value to Po...
Power Automate
Unanswered

Collection value to Power Automate

(0) ShareShare
ReportReport
Posted on by 248

Anyone know how to take a value from a collection displayed in a text field and send that value for use to a Power Automate flow? I've tried this, however it errors in the Power App. 'PowerApp->HTTP'.Run(Gallery3.Selected.id) The Flow is: "PowerApp->HTTP" and I want to use one of the values 'ID' as an input in a http string in Power Automate.

 

I crossed posted in Power Apps already: https://powerusers.microsoft.com/t5/Building-Power-Apps/Collection-value-to-Power-Automate/m-p/674721/highlight/false#M215487

Categories:
I have the same question (0)
  • CFernandes Profile Picture
    8,504 Most Valuable Professional on at

    @cbernier12 

     

    Let consider, you have a Power Apps with two simple controls, Camera and Text Inputs.

     

    Create a Collection in Power Apps.

     

     

    Collect(
     Controlcollection,
     {
     Name: TextInput1.Text,
     Image: Camera1.Photo
     }
    );

     

     

    You need to Convert the Collection in JSON using JSON function.

     

     

    Set(
     JSONVar,
     JSON(
     Controlcollection,
     JSONFormat.IncludeBinaryData
     )
    );

     

     

    Pass the Variable in Power Automate.

     

     

    MainFlow.Run(JSONVar)

     

     

    In Power Automate, one you get the JSONVar variable you are Parse in using Parse JSON action.

     

    You can have a look at my article: 

    https://clavinfernandes.wordpress.com/2020/02/12/convert-multiple-power-apps-media-controls-from-power-apps-screen-to-

    html-and-pdfs/

     

    Or just follow my video at https://www.youtube.com/watch?v=V8LpZpPGtV8

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • cbernier12 Profile Picture
    248 on at

    @CFernandes Thanks that moved me forward a bit.  I have a gallery of items and when I select one I'd like to only have the ID of the selected item sent over to Power Automate as a variable.  Right now all the IDs are sent over which isn't what I want.

  • yashkamdar Profile Picture
    1,044 on at

    Hello Team,

     

    Here is what you need to do. Go ahead and add a check box to your Gallery control.

     

    For the OnCheck property of Checkbox use the formula - 

    Collect(selected,{ID:ThisItem.Column3})

     

    yashkamdar_0-1598985071019.png

     

     

    For the OnUnCheck property of Checkbox use the formula-

    Remove(selected,{ID:ThisItem.Column3})

     

    yashkamdar_1-1598985088839.png

     

     

    Then go ahead and configure a button and configure it as follows so that PowerApps passed the values of selected field as concatenated string to Flow - 

     

    IDGenerate.Run(Concat(selected,ID))

     

    yashkamdar_2-1598985141449.png

     

     

    If you run the Power Apps, select the different check boxes and hit the button you get the different values -

     

    (In my case, column 3 holds names of different persons so that has come up)

     

    yashkamdar_3-1598985371188.png

  • cbernier12 Profile Picture
    248 on at

    @yashkamdar Thanks for the point, I figured it out a different way: Set(varID,Gallery3.Selected.id);('PowerApp->HTTP'.Run(varID)).  Worked perfectly.

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 238 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 225

#3
Haque Profile Picture

Haque 181

Last 30 days Overall leaderboard