web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : KKIgX2ewv1y3DR/eyGDG5B
Power Apps - Microsoft Dataverse
Answered

Dataverse Choice Column (Yes/No) with Toggle control in Power App

Like (0) ShareShare
ReportReport
Posted on 21 Dec 2023 15:24:57 by 181

Hello all,

 

 I am struggling with a relatively simple thing that works perfectly with SharePoint choice column:

  • I have Choice Column (Yes/No) in Dataverse
  • Toggle control added in form to replace the combo box

However, I can't seem to figure out how to configure the toggle button to replace the default combo box within the form (strange that Power Apps wouldn't recognize that it is a toggle button in Dataverse to begin with).  The Dataverse column is titled Archived, and I can't get the toggle button to correctly show what is selected (Yes/No) within the Dataverse table, and I also can't get the submit form to update Dataverse based on what is selected on the toggle button.  

 

I tried configuring the update function of the datacard to: If(tglArchived.Value, 'Archived (Action_Plans)'.Yes, 'Archived (Action_Plans)'.No) so I don't get an error in the datacard, but when I hit the submit form, dataverse doesn't change.

 

I set the default for the toggle to ThisItem.Archived.  I also tried various other approaches with no luck.

 

I left the combo box in place so I could monitor:

trstrean_0-1703172100733.png

As you can see, nothing updates.

 

Any advise on this? I literally spent hours on this and I couldn't figure it out.

 

Thanks a lot!

Categories:
  • trstrean Profile Picture
    181 on 22 Dec 2023 at 13:02:26
    Re: Dataverse Choice Column (Yes/No) with Toggle control in Power App

    You were both right.  After it was confirmed that it should work, I re-created the form and gallery to see if the problem continued and it somehow works today.  Strange things like that happen in this environment where the only fix is to just re-create it.  I think when I duplicated the screen to test a different design approach, something in the underlying mechanics of the form got broken.  Starting over removed that glitch.

  • Verified answer
    Jonathan Manrique Profile Picture
    2,682 on 22 Dec 2023 at 07:21:00
    Re: Dataverse Choice Column (Yes/No) with Toggle control in Power App

    Hi @trstrean 

     

    The first thing is to determine the type of column


    There are Boolean Option Sets and that is the one that allows you to use the toggle control.


    If you use a Choice Option Set where there are also Yes/No as outputs, you cannot use the toggle control but must use a dropdown.

     

    More or less how it works is like this, when you use boolean (yes/no), the database already saves by default the value you enter, and there are only two values.

     

    In the case of Choice, the database seems to allow a blank third value unlike the boolean which does not and that is where the toggle control cannot be used.

     

    There is a way to use it and it is by making conditionals and using the patch function

     

    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
    You can accept more than one post as a solution

  • Verified answer
    v-xiaochen-msft Profile Picture
    on 22 Dec 2023 at 03:38:05
    Re: Dataverse Choice Column (Yes/No) with Toggle control in Power App

    Hi @trstrean ,

     

    It worked for me.

    vxiaochenmsft_0-1703216186367.png

    vxiaochenmsft_1-1703216200312.png

    vxiaochenmsft_2-1703216211655.png

    vxiaochenmsft_3-1703216228270.png

    vxiaochenmsft_4-1703216254825.png

    vxiaochenmsft_5-1703216273639.png

     

    Best Regards,

    Wearsky

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Featured topics

Loading complete