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 / ComboBox get reset to ...
Power Apps
Unanswered

ComboBox get reset to 0 inside Gallery on update

(0) ShareShare
ReportReport
Posted on by 901

Hello, Power Apps Community,

I have run out of gas. Not sure how to get this working. Every time I update a ComboBox value inside the gallery it reset the rest to 0

 

r.PNG

 

Items: colScores

 

 

ClearCollect(
 colScores,
 {Rating: "25%"},
 {Rating: "50%"},
 {Rating: "75%"}
);

 

 

 

Combox: DefaultSelectedItems: 

 

 

ForAll(tblTCM_TOCResults,ThisItem.Score*100 & "%")

 

 

 

Patch forumla.

 

 

ForAll(
 RenameColumns(
 Gallery3.AllItems,
 "ID",
 "ID1"
 ),
 Patch(
 tblTCM_TOCResults,
 LookUp(
 tblTCM_TOCResults,
 ID = ID1
 ),
 {Y_x002f_N:RadioViewYesNoOtherNA.Selected.Answer},
 {Comments:TextInput2.Text},
 {Score:Value(ComboBox5.Selected.Rating)},
 {CategoryScore:Value(Label4.Text)}
 
 )
)

 

 

 

As always, thank you in advance.

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    155,544 Most Valuable Professional on at

    Hi @oappdev ,

    I suspect you are running something on each selection ? The default behaviour of an editable gallery is that any  "unbound" (not linked to a value forming the Items of the gallery) will reset when anything is run from inside the gallery. You can either Patch the value to a field in the gallery Items and then link the field to the Default of the control, or simply Patch the whole lot at the end  (do not run any code from inside the gallery). You can also improve the performance of your Patch by doing this

    Patch(
     tblTCM_TOCResults,
     ForAll(
     Gallery3.AllItems As aPatch,
     {
     ID: aPatch.ID, 
     Y_x002f_N: aPatch.RadioViewYesNoOtherNA.Selected.Answer,
     Comments: aPatch.TextInput2.Text,
     Score: Value(aPatch.ComboBox5.Selected.Rating),
     CategoryScore: Value(aPatch.Label4.Text)
     }
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • oappdev Profile Picture
    901 on at

    Thank you so much! @WarrenBelz I will give it a try and circle back with the results.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 387

#2
timl Profile Picture

timl 340 Super User 2026 Season 1

#3
Vish WR Profile Picture

Vish WR 301

Last 30 days Overall leaderboard