cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BheeRye
New Member

Radio Button Values not Loading Values in Edit Form

I have several radio buttons set up in my custom form. One, for example, is for "Material Type".

BheeRye_0-1629749948244.png

This allows the user to select a material type, and the "x" icon is meant to reset the radio button selection, returning it to a blank state.

When creating a new item with the new form (same format), this works fine, but with the edit form, I run into a major problem. The value in the list item is not carried over, and the field shows as blank in the edit form. 

 

Here is a screenshot of the field structure in Power Apps:

BheeRye_2-1629750342773.png

 

I have the Update property of the field set to the radio button: {Value: 'Material Type_Value_Edit'.Selected.Value}

The OnSelect property of the "x" icon is Reset('Material Type_Value_Edit')

The Default property of the radio button itself is blank

 

A workaround to this I found was to change the Default property of the radio button to ThisItem.'Material Type'.Value. Doing this, the edit form did pull in the correct value, but it was no longer possible to use the "x" as I intended because the radio button would simply reset to its original value instead of going blank.

 

I have searched and searched and cannot find anybody asking about the same issue that I am experiencing. I need the radio button to hold its value when I initialize the edit form but also reset to blank when I use the cancel icon.

 

1 ACCEPTED SOLUTION

Accepted Solutions

@BheeRye ,

On the Cancel Icon OnSelect

UpdateContext({varReset:true})

on the Default

If(
   varReset,
   Blank(),
   ThisItem.'Material Type'.Value
)

at Screen OnVisible

UpdateContext({varReset:false})

 

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.

View solution in original post

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @BheeRye ,

The Default is the issue - assuming the field is called 'Material Type' ands it is a Choice field, the Default should be

ThisItem.'Material Type'.Value

 

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.

Hi @WarrenBelz

 

That is a workaround I found to fill in the values. However, setting the item's value as the default no longer allows me to reset that field's value to a blank using my cancel icon.

 

Instead, it resets to the saved value of that item in the list.

 

I want to be able to do both: load in the item's value for that field, but also be able to reset the field to blank in the form.

@BheeRye ,

On the Cancel Icon OnSelect

UpdateContext({varReset:true})

on the Default

If(
   varReset,
   Blank(),
   ThisItem.'Material Type'.Value
)

at Screen OnVisible

UpdateContext({varReset:false})

 

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.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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