cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kudo Kingpin
Kudo Kingpin

Three way toggle in powerapps

Hi, I have some apps that update a sharepoiint choice column that have two possible values -- Yes and No.

I have been using a toggle control to set these values, but the toggle control requires that I have a default value of either Yes or No.  If user does not even interact with the control the default is sent to sharepoint.  I need to be able to have an  indefined or Blank() state on the Toggle so that if a user does not even touch it , no value is sent back to sharepoint. 

 

I tried using radio buttons to render the columns but it seems that if a user clicks a radio button to select it, then clicks it again to un-select it the second click does not unselect the option (it just reselects it),

 

I tried using checkboxes,  and this works, but the UI looks odd and there is a lot of repeated code to test if the checkbox was already checked, and if the other checkbox was checked, etc.

 

I tried using a slider  with the range -1 to +1,  and this works too , but again, the UI looks odd.

 

How do other people handle a Yes/No choice column in Sharepoint with the option of have a third (unknown) choice that just sets the value to null in the sharepoint list?

 

 

 

I know how to sent the values back to sharepoint, I'm asking how to collect the data (the three possible states) in the UI.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: Three way toggle in powerapps

Hi@RussellGove,

Based on the issue you mentioned, you want to know others how to update the Choice column “Yes/No” and display these values in the UI.

Firstly, let me explain something about Toggle. The value of Toggle will never be empty. It could only be true or false. The value of dropdown will always be one item of its Items. If there's no empty item in its Items, it will never be empty value.

Fortunately, the Combo box could be empty value, even its Items have no empty value.

Since Yes/No column is Choice, you can directly create an App from your SP list.0514-01.png

Then you can have an EditForm like this.

0514-02.png

If users do not even interact with the control, Combo Box will return null.

Please make sure that set the combo box's datacard Update property like this:

DataCardValue6.Selected

Ps: Please attention to this setting in case if you want to update the blank value.

0514-03.png

In the end, we can achieve this, the three possible states show in the gallery.

0514-04.png

Best Regards,

Qi Qiao

View solution in original post

2 REPLIES 2
Highlighted
Super User
Super User

Re: Three way toggle in powerapps

@RussellGove 

When making apps for a PC/Laptop I use a Dropdown control for 3 or more options.

 

When making apps for mobile I use gallery with a button inside and load the Items property with each option I need.  I’ve used this enough that I made a component out of it

 

Of course, the SharePoint column that holds this data for both options is a Choices type.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

 

 

 

Highlighted
Microsoft
Microsoft

Re: Three way toggle in powerapps

Hi@RussellGove,

Based on the issue you mentioned, you want to know others how to update the Choice column “Yes/No” and display these values in the UI.

Firstly, let me explain something about Toggle. The value of Toggle will never be empty. It could only be true or false. The value of dropdown will always be one item of its Items. If there's no empty item in its Items, it will never be empty value.

Fortunately, the Combo box could be empty value, even its Items have no empty value.

Since Yes/No column is Choice, you can directly create an App from your SP list.0514-01.png

Then you can have an EditForm like this.

0514-02.png

If users do not even interact with the control, Combo Box will return null.

Please make sure that set the combo box's datacard Update property like this:

DataCardValue6.Selected

Ps: Please attention to this setting in case if you want to update the blank value.

0514-03.png

In the end, we can achieve this, the three possible states show in the gallery.

0514-04.png

Best Regards,

Qi Qiao

View solution in original post

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (10,263)