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 / Can't collect Gallery1...
Power Apps
Unanswered

Can't collect Gallery1.AllItems inside Form

(0) ShareShare
ReportReport
Posted on by 338

I have a Gallery inside a Card of a Form. This Gallery has two elements: a ComboBox (of peoples' names pulled from a SharePoint List) and a Dropdown (with custom values).

 

From my understanding, to collect each "row" of the Gallery's elements into a collection, the code should be something like this:

 

ForAll(Gallery1.AllItems, Collect(tempCol, {Name: ComboBox1.Selected.Name, Type: Dropdown1.Selected.Value}))

 

From another post, I read that the button triggering the collection needs to be inside the same card as the gallery otherwise it won't collect anything. So I've created a button inside the same card and set the above to it.

 

When I click the button, the collection's values are blank. The collection has a row for each "row" of the Gallery, but it appears that it couldn't read the values of the combobox or dropdown.

I discovered that if I set a Default value for the combobox or dropdown, then the button will collect that default value instead of nothing.

 

What might be going on here? Why can't Collect read the values of the combobox and dropdown?

 

Thanks

Categories:
  • TheRobRush Profile Picture
    11,128 Moderator on at

    The following will concat everything selected in combobox 1 (Person 1, Person 2, Person 3, Person 4) in a Name Column of tempCol, and in second Type column return the value selected from your dropdown

    ClearCollect(
     tempCol, 
     ForAll(
     Gallery11.AllItems,
     If(IsBlank(ComboBox5.SelectedItems)=false,
     
     { Name: Concat(ComboBox5.SelectedItems,Title,", "), 
     Type: Dropdown6.Selected.Value
     })
     )
     )

     

    Concat portion can also be changed to collect a nested table of names, instead of having them as a string.

     

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 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 320

#3
Mohsin Ali Profile Picture

Mohsin Ali 246

Last 30 days Overall leaderboard