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

Can't collect Gallery1.AllItems inside Form

(0) ShareShare
ReportReport
Posted on by 314

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:
I have the same question (0)
  • 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

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard