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 Platform Community / Forums / Power Apps / how to handle Boolean ...
Power Apps
Unanswered

how to handle Boolean value in Datatable

(0) ShareShare
ReportReport
Posted on by 70

Hi,

 

I have a datatable connect to DB table. this table has two columns, which is 1 or 0. I have choose checkbox to show this boolean value in the datatable. but the checkbox has been checked no matter the value is 1 or 0.

 

Please advise how to make the checkbox is checked only for the 1 value.

 

Thanks,

 

Xiang

see screenshot:

 

datatable - PowerApps.png

 

 

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,989 Moderator on at

    @Xiangchen_2019 

    A checkbox is appearing because your Data Table is using the font Open Sans.  Try something different like Segoe UI or Arial and the values will display properly.

     

    ---
    Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

  • Xiangchen_2019 Profile Picture
    70 on at

    @mdevaney 

     

    Thank you. I have tried, but the checkbox still has been showed as checked. I want to show the checkbox, but I want to the checkbox got checked once is '1' and unchecked once it is '0'.

     

    the screensht is as below:

     

    datatable 2- PowerApps.png

  • mdevaney Profile Picture
    29,989 Moderator on at

    @Xiangchen_2019

    Do any of the available fonts show something different than a checkbox for you?

  • Xiangchen_2019 Profile Picture
    70 on at

    @mdevaney,

     

     

    I have tried all the other font, all shows the checkbox as checked.

     

    Thanks,

     

    Xiang

  • mdevaney Profile Picture
    29,989 Moderator on at

    @RezaDorrani 

    Hi there Reza.  It appears you are online at this moment so I hope you don't mind me asking a question.  Smiley Happy

     

    @Xiangchen_2019  has a true/false field showing as a checkbox no matter what value true/false.  Is this something you have encountered before?  Changing fonts seems to work for me but it doesn't appear to be the solution for them.

  • RezaDorrani Profile Picture
    12,143 on at

    Hi @mdevaney & @Xiangchen_2019 

     

    I am not sure how checkbox is showing as an option in the first place

    Just tested with a bit type column in the DB and these are the only options a DataTable in PowerApps provides me afor this type of column

    Capture.PNG

     

    I have tried all fonts as well - but mine stays consistent as toggle and also shows accurate data

     

    --------------------------------------------------------------------------------
    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

  • Xiangchen_2019 Profile Picture
    70 on at

     @RezaDorrani and @mdevaney 

     

    My bit type column shows as ""boolean column" in data table. see screenshot. I do not have toggle column as option at all.

    confirmed - PowerApps.png

  • Verified answer
    mdevaney Profile Picture
    29,989 Moderator on at

    @Xiangchen_2019 

    Try this: change the control type to a Text Column using the Edit Fields menu

     

    img10.png

     

    Then, select the confirmed column and put this code in the Text property.  Do the same for the registered column.  It worked for me! 

     

    If(ThisItem.PerDiem,"☑","☐")

     

    @RezaDorrani 

    I think manually defining the outputs using a Unicode symbol will work here.  However, I did not think of that approach until you showed us the idea to change the control type idea.  Thank you for taking the time during your evening to help us out.  I very much appreciate it!  Smiley Happy

     

     

  • Xiangchen_2019 Profile Picture
    70 on at

    @mdevaney 

     

    It works for me. Thank you so much!

     

    @RezaDorrani 

    Thank you so much for all your time and efforts.

     

    Xiang

  • JamesThurber Profile Picture
    10 on at

    I came across the same issue @Xiangchen_2019 & @mdevaney .  Every checkbox in the datatable was checked even when it should have been unchecked.  I played with the functions and still didn't like the results.  Then I accidentally deleted the Text field for the column and the checkboxes are filled accurately now.

     

    So to get the checkboxes in the column to react correctly to a boolean value just remove the Text value for the column.

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…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard