Nole321
Nole321

Reputation: 13

PowerApps Radio Item not clearing

I am building a PowerApp form, not a canvas app. I have a couple of fields added to the form that I changed the default combo box into a Radio type. I transferred all the datapoints needed (Default = ThisItem.'Review Type'.Value)(Items = Choices([@Submissions].'Review Type')). Everything works as intended and as if it was still the default combo box. View/edit an item, the value changes. View/edit a different item, The value changes as expected. But there is a weird behavior when viewing/editing an item with no value in that field just after viewing an item that did have a value. The Radio Type will hold onto the previous value when ThisItem.''.Value is blank. If I close and open that same item, it is still holding the value. But here is the wired part. If I view/edit a different item (also with no value) after viewing the first item (having no value) that held onto the previous value, the radio type clears properly. Only the first item with no value after an item with a value has the issue. Even if I select New it holds the previous value. But clears if I view a different item without a value. Do anyone understand why only the radio field has this issue?

I have tried Reset(), ResetForm(), and RadioReviewTyype.Selected.Value = Blank() on every action from the app, SharePointIntegration, and the datacard.

Upvotes: 0

Views: 845

Answers (2)

Lee
Lee

Reputation: 1

Modify the radio button so that it can handle items correctly when blank. Try this on the default property of the radio button:

If(IsBlank(ThisItem.'Review Type'), "", ThisItem.'Review Type'.Value)

Upvotes: 0

Ron
Ron

Reputation: 1

I am building a canvas app and I encountered the same situation.

  1. Saved a form with data to a Dataverse table. Let's call this record 2 in the table.

  2. Open a different record on the same form in edit mode. Let's call this record 1 in the table.

  3. If there is a blank field on the edit form for record 1, it will always keep the value of the last saved item on record 2 for that field. It only affects fields that are blank.

I was able to resolve this by using the ResetForm() function. I added this to my button that takes me to the screen with my previous entries. Ex. ResetForm(Form1)

Upvotes: 0

Related Questions