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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Apps
Answered

Yes/No checkbox

(0) ShareShare
ReportReport
Posted on by

I have 5 columns in SP list set to Yes/No type. In my app, whenever I check the checkbox (separate data cards), I want to show it as Yes in my data source. No if unchecked. How can I do this?

Categories:
I have the same question (0)
  • biancadevera Profile Picture
    on at

    Please help @StalinPonnusamy @WarrenBelz @RandyHayes 

  • Verified answer
    StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @biancadevera 

     

    I assume you are looking to update Datasource right away. It means when you check and UnCheck the checkbox.

     

    Set OnCheck property of Checkbox to

    Patch(SPList,ThisItem,{ColumnName:true})

     

    Set OnUncheck property of Checkbox to

    Patch(SPList,ThisItem,{ColumnName:false})

     

    Make sure to set the Default property of Checkbox control to

    ThisItem.ColumnName

     

    And you may need to Remove the Update property of the DataCard since we saved the data already.

    Note: It will be lots of calls Datasource for each check and UnCheck.

     

    If you are not looking to Save immediately then  Set the Update property of DataCard to 

    CheckBoxName.Value


    Thanks,
    Stalin - Learn To Illuminate

  • Gerard Simpson Profile Picture
    2,987 Moderator on at

    Hi @biancadevera 

     

    Once you have brought in your checkboxes to each data card, set their default to 'Parent.default', make sure the default in the Datacard is set to 'ThisItem.YourYNColumnName' and also change the 'Update' property of the datacard to 'Checkbox#.Value'.

     

    If you want to show specific text for true vs false selection, you can set the 'Text' property of each checkbox to 'If(Self.Value, "true text", "false text")'.

     

    Hope this helps - Good luck!

  • Gerard Simpson Profile Picture
    2,987 Moderator on at

    Just to follow up, I'm taking from your original message you are using the Yes/No Type which is a boolean, so in your backend data this wont show as "yes" or "no", it will show as a tick, when yes and blank space when no as follows:

     

    AmDev_0-1637418963383.png

     

  • biancadevera Profile Picture
    on at

    Hi @StalinPonnusamy 

     

    It worked but how can I show the value on Edit form? After I saved the entry and edit it, it shows blank. I've already set the Update property to 

     

    CheckBoxName.Value
  • biancadevera Profile Picture
    on at

    Yes it's boolean and my backend shows exactly like this.

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @biancadevera 

     

    Set the default property of the checkbox to

     

    ThisItem.ColumnName

    StalinPonnusamy_1-1637422417380.png

     

     

    Set the DataCard to

    ColumnName

    StalinPonnusamy_0-1637422400033.png

     

     

     

  • biancadevera Profile Picture
    on at

    Yep. That worked! Thank you so much @StalinPonnusamy 

  • biancadevera Profile Picture
    on at

    Hi @StalinPonnusamy just a follow up question. How can I reset the checkboxes on New form? It looks like it saves the last entry when creating new one. Please advise. Thanks!

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @biancadevera 

     

    Set Default property of Checkbox to

    Parent.Default

     

    Another way to set false for a new form

    If(EditForm1.Mode=FormMode.New, false, Parent.Default)

     


    Thanks,
    Stalin - Learn To Illuminate

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 372 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 303 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 238 Super User 2026 Season 1

Last 30 days Overall leaderboard