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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Dataverse Choice Colum...
Power Apps
Answered

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

(0) ShareShare
ReportReport
Posted on by 185

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!

I have the same question (0)
  • Verified answer
    v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    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

  • Verified answer
    Jonathan Manrique Profile Picture
    2,695 on at

    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

  • trstrean Profile Picture
    185 on at

    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.

  • Suggested answer
    PakWarrior Profile Picture
    17 on at
    For Classic Toggle - 
     
    Toggle: Default: ThisItem.Test2 = 'Test2 (TestTables)'.Yes
     
    For Modern Toggle - 
     

    Toggle: Checked: ThisItem.Test2 = 'Test2 (TestTables)'.Yes

     

    Datacard: Update: If(DataCardValue2.Checked, 'Test2 (TestTables)'.Yes, 'Test2 (TestTables)'.No)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard