Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Datatable and boolean confusion

(1) ShareShare
ReportReport
Posted on by 1,082

I am seeing something weird I don't understand...

 

I have a datatable connected to SharePoint.  One column is Yes/No column.

 

In the datatable it has checkboxes but they are showing incorrectly, showing checked even though the values are false?

 

Screenshot 2021-02-02 141515.png

However if I put a fake command around the item, it actually displays correctly?

Screenshot 2021-02-02 141649.png

Any idea the right way to get the data table to work?

 

Thanks,

Terry

  • Suggested answer
    JMW-Lutron Profile Picture
    3 on at
    Datatable and boolean confusion
    I think I found a solution and I have a theory about what the issue is. I deleted the "ThisItem..." portion out of the Text function for the boolean column.

    Before:
     
     
    After:
     


    My theory is that the Text property isn't used and is getting set erroneously which then overrides the boolean logic of the field and ends up putting a checkbox everywhere.
  • timsheehan Profile Picture
    23 on at
    Re: Datatable and boolean confusion

    RhysD's solution of clearing the "Text" property for the column works for me as well, this should be marked as the solution rather than the workaround

  • Shaguar357 Profile Picture
    211 on at
    Re: Datatable and boolean confusion

    Thank you @RhysD !!  That worked for me!

  • JasonSmithTBS Profile Picture
    46 on at
    Re: Datatable and boolean confusion

    I'm having this same issue a year later! This is beyond insane that it hasn't been addressed yet.

     

    Anyway, @RhysD , I know its been a year, but I'm hoping you might remember what you did. I'm unclear what you mean by wiping out the formula bar. Did you change something within the Text property of the column?

     

    UPDATE: Came across other posts regarding the same issue with one elegant solution by @mdevaney to change the column to a Text content type and then conditionally set the displayed text to a checked box character using a font that has one and an unchecked font character. 

     

    The correct solution I think, and I believe it is what you discovered accidently, is to leave the column content type as Boolean and just remove or comment out the default ThisItem.Column_Name that is in the Text property of the column. Once clear, the column will properly display the checkboxes as checked and unchecked per the data!

     

    Hope this helps someone.

  • RhysD Profile Picture
    42 on at
    Re: Datatable and boolean confusion

    Hey guys, I came across this article when I was dealing with the same problem myself. I actually found that wiping out the information in the formula bar seems to resolve it altogether, that or commenting out the original information. I'm not too sure why this seems to work, but hey-ho! 

  • Mattw112b Profile Picture
    1,082 on at
    Re: Datatable and boolean confusion

    Thanks this worked... but a.) I don't understand why MS doesn't fix this... seems like a big mistake  b.) Still don't understand why my fake formula worked?

  • Verified answer
    timl Profile Picture
    34,935 Super User 2025 Season 1 on at
    Re: Datatable and boolean confusion

    Hi @Mattw112IG 

    Unfortunately, I don't the data table control works too well with boolean values.

    Perhaps @mdevaney's advice in this post about changing the boolean column to a text column and outputting a checkbox symbol might be the solution.

    https://powerusers.microsoft.com/t5/Building-Power-Apps/how-to-handle-Boolean-value-in-Datatable/td-p/373767

     

    If(ThisItem.'PTO Approved',"☑","☐")

     

     

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,635 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard