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
Super User II
Super User II

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

@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.

And what is DataCardValue128?

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

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

 

I use submit. Thank you!

Dual Super User II
Dual Super User II

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!

@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?

@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 😞

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
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (3,120)