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.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (4,895)