I’m trying to reset radio buttons on the Edit Form (Connected to a SharePoint List) in a Canvas PowerApp.
I have a mandatory parent Radio Button with options ‘A’ or ‘B’
The user is required to fill out 4 additional child choice fields ONLY if they select ‘A’
-1 default (from PowerApps) Combo Box
-3 custom Radio Buttons (Combo Box DataCard was replaced with a Radio Button)
If the user selects ‘B’ from the parent Choice then these fields are hidden & disabled….
What I need is just to make sure the child choice fields are cleared if the user edits the form and changes the parent choice field from ‘A’ to ‘B’…
Example;
Version 1 – User saves the New Form with Option ‘A’ and the 4 associated choices are filled
Version 2 – User opens the Edit Form & changes the Parent Choice Field option to ‘B’ then the 4 child fields need to both reset to their default blank value on their DataCards and when saved the Choice Fields in the SharePoint List should cleared.
I can get this to work with the default Combo Box control – Both DataCard & SharePoint Field are cleared.
But for the Radio Buttons – I can successfully get the value on the PowerApp Edit Form DataCard to clear but when I save the form the associated SharePoint choice field is not updated and still retains the value from Version 1.
I’m using the following Form Logic
EditForm
OnVisible:
UpdateContext({varClearChoices: false})
Parent Choice Field
OnChange:
If(ParentChoice.Selected.Value = "B", UpdateContext({varClearChoices:true}),UpdateContext({varClearChoices:false}))
Child Combo Box Choice Field - (Working)
DefaultSelectedItems:
If(varClearChoices,{Value:""}, Parent.Default)
Child Radio Choice Field (Radio Button - Not Working)
Default:
If(varClearChoices,"",ThisItem.'Child Radio Choice Field'.Value)
Reset:
varClearChoices
I’m hoping to get the Radio Button to behave the same way as the default Combox box does. The value should be cleared/deselected on the Data Card and the SharePoint Choice Field should be cleared also.
I know there’s some minor differences between the forms default Choice Field ComboBox & a custom Radio Button but this one is pulling my hair out.
I’m assuming I’m missing something obvious here? It almost seems like the empty Radio Button just isn’t able to update the Choice Field on SharePoint.
There’s always the option to try with a Single Text Field to hold the Radio Choice Fields or just go back to using the default Combo Box – which I’m not particularly a fan of for just 2 options to choose from.
redaxe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.