cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Prodigy
Post Prodigy

Reset ComboBox not working

Hi Folks -

 

I have a combo box called PFRPartnership.

 

I am running into an issue when a user selects a data element from the gallery that ALREADY has a value present for the Combo Box.  The issue comes into play when the user backs out of that data element and selects a new Data Element from the gallery that DOES NOT have a value selected. Then if the user submits, even though that didn't pick a value for the Combo Box, it still updates the SharePoint list with the value from the previous data element.

 

How do I prevent this? This is causing major issues.

 

I tried Reset(PFRPartnership)  but that doesn't seem to work. Where should I be putting that?

 

Thank you!

10 REPLIES 10
Highlighted
Super User
Super User

Re: Reset ComboBox not working

Is the combo box part of the gallery? What are the values for Default, Defaultselected and Itema property of the combo box?

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
The Power Addict
https://thepoweraddict.com
Highlighted
Post Prodigy
Post Prodigy

Re: Reset ComboBox not working

@PowerAddict 

 

The DefaultSelectedItems is:

 

If(DataCardValue128.Selected.Value = "No",Blank(),Filter(PartnershipList,Name=ThisItem.PartnershipID))

Default is blank.

 

Items is as follows:

Sort(PartnershipList,Alias,Ascending)

 

The ComboBox is part of the a Form. Users select a data element from the Gallery and are navigated to the Form.

Highlighted
Super User
Super User

Re: Reset ComboBox not working

And what is DataCardValue128?
Highlighted
Super User
Super User

Re: Reset ComboBox not working

Also what are you using to submit the form? SubmitForm or Patch?
Highlighted
Post Prodigy
Post Prodigy

Re: Reset ComboBox not working

DataCard128 is just a "Yes" "No" field.  If yes, the ComboBox field is displayed.

 

I use submit. Thank you!

Highlighted
Dual Super User
Dual Super User

Re: Reset ComboBox not working

Hi @simms7400 

 

Since the form is inside a DataCard on a form, you need to use:

Reset(DataCardValue12)

Here, DataCardValue12 should be the name of the control that you want to reset. Note that the datacard name is different from the control name.

If this doesn't help, you can also set the configuration like:

Button to Reset -> Set(ResetControl,true);Set(ResetContol,false)
Control to Reset -> Reset property -> ResetControl

 

Hope this Helps!

 

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!

Highlighted
Post Prodigy
Post Prodigy

Re: Reset ComboBox not working

@yashag2255  I'm not following your first suggest. And unfortunately, the second one does not work. Any ideas?

 

I put the Reset variable on the "OnVisble" of the EidtForm. Is that correct?

Highlighted
Post Prodigy
Post Prodigy

Re: Reset ComboBox not working

@yashag2255 

 

I put Set(ResetControl,true);Set(ResetControl,false) on the "Reset" property of my combobox.

Then I put ResetControl in the OnVisible property of my form.

 

Still doesn't reset 😞

Highlighted
Post Prodigy
Post Prodigy

Re: Reset ComboBox not working

Again, the issue is when a user selects a data element from the Gallery and navigates to the EditForm where a value is ALREADY set for this ComboBox. Then, if the user goes back tot he gallery and selects a new Data Element that DOES NOT have a value selected for ComboBox, it will remembers the previous element and will put that value int he combobox upon Submit. Very annoying and causing lots of data issues.

 

Now, for the 2nd instance mentioned above, if I select a value, then clear the combo manually and then hit my reset form button, the ComboBox remember values from the previous form is removed.

 

How do i fix this??

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,626)