cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JadeJamig
Regular Visitor

How to make radio button output to NULL

I have a column in my sql table that is a type of BIT and is Nullable. Now, in my power app I have a form which contains a radio button that is connected to this BIT column. The options on the radio button are YES and NO. I can submit the form even if I do not choose an option from the radio button since it is not required and can contain NULL in the database. However, if I submit the form without choosing an option from the radio button, it still saves as "0" (same as false and off) in the database.

How can I change the output of the radio button to NULL when not selecting any of its options?

2 REPLIES 2
EddieE
Super User
Super User

@JadeJamig 

Try turning on Formula-level error management in Settings. This article seems to suggest that this will do the trick.

 

I don't have access to SQL to test, sorry. This method works for sending Blanks to Date fields in SharePoint so I was thinking it maybe the way to go.

Shujaath_Khan
Super User
Super User

Hi @JadeJamig 

 

To achieve this

you can try below changes to the radio list

 

 

Screen1.OnVisible = UpdateContext({radioDefault:""})

Radio1.Items = [true,false]
Radio1.Default =  radioDefault

Datacard1.Update = Radio1.Selected.Value

 

 

P.S. The only challenge is in using ["YES", "NO"] in place of [true, false] due to limitations

 

Reference

Thanks

 

Please click Accept as solution if my post helped you solve your issue. 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

Check out the New Ideas Site

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

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