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 / Loop through all items...
Power Apps
Unanswered

Loop through all items of gallery and patch the selected combobox value

(0) ShareShare
ReportReport
Posted on by 64

Hello! 

 

I've watched multiple videos from @Shanescows  and @RezaDorrani  and am continuing to run into issues. 

 

I have a gallery that contains a collection: 

ClearCollect( colDetailedResourcing, Filter(CanvasImpacts, CanvasId.CanvasId = varEditCanvas.CanvasId));

 

Gallery Items:

Sort(colDetailedResourcing, FunctionalArea.FunctionalAreaName, SortOrder.Ascending) 

 

The gallery includes each functional area in a label, and a combobox with choices of involvement levels, which is a single-select value. I want to loop through each item in the gallery and get the value from that combobox and update the matching record in my Dataverse table. When I use this formula, it updates each record, but uses the last selected choice for all records instead of updating each one based on it's selected choice.

ForAll(ResourcingGallery_4.AllItems As DETAILEDRESOURCING,Patch(CanvasImpacts,DETAILEDRESOURCING,{ResourceInvolvement: ComboBox4.Selected.Value})

 

I also attempted the editable grid option with a hidden save button that builds a secondary collection and patches those changes, but ran into errors about conflicts with the network (though I'm not sure how) and I do have some additional logic that autopopulates a default value in the combo boxes, so those wouldn't necessarily get picked up in the secondary collection. There's probably a way around this, but my brain hurts. 

 

Please help! 😀

Categories:
  • enriqueglopez Profile Picture
    518 Moderator on at

    Try this

     

    ForAll(ResourcingGallery_4.AllItems As DETAILEDRESOURCING,
    Patch(
    CanvasImpacts,DETAILEDRESOURCING,
    {ResourceInvolvement: DETAILEDRESOURCING.ComboBox4.Selected.Value}
    ) 

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution ✅ and give it a 👍 so we can help others in the community.

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 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard