cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

How to change DataTable column to display Yes or No when the data type on list is a yes/no

Hello,

 

I am using a DataTable to display data from my datasource, howerver i have a column that is a Yes/No data type but it is showing a check mark and i want it to display as a yes or no. I am displaying how it looks like. Any suggestions? pic 17.JPG

Thank you,

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: How to change DataTable column to display Yes or No when the data type on list is a yes/no

Hi @patty789 ,

 

Did you make sure that your data source is SharePoint list? I just tested with SharePoint Yes or No column and by default it shows as below in a data table control:

Capture.JPG

 

Try to delete this field from data table and add it again to test.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Highlighted
Super User
Super User

Re: How to change DataTable column to display Yes or No when the data type on list is a yes/no

You can remove the check box and just put in a label and put =If(ThisItem.ColumnName=true, "Yes","No")

 

There are a few ways you can do basically the same way but this is a quick and easy way. 

Highlighted
Helper IV
Helper IV

Re: How to change DataTable column to display Yes or No when the data type on list is a yes/no

@rebeccas Thank you for your reply howerver i am unable to remove the check mark as it is pulling straight from the datasource. 

I am using a combo box to filter and using the DataTable to diplay based on the address. I tired to go to the Text property of the column and modify it there but it does not take the change it still shows as a checkmark. If(ThisItem.ColumnName = true, "Yes", "No")

Highlighted
Super User
Super User

Re: How to change DataTable column to display Yes or No when the data type on list is a yes/no

Sorry...I didn't catch the "Data Table" part that you had clear as day..lol. 

 

I don't think there is a way to change that in there. Only two options I know would be to change your column to a text and then control where it gets put in to allow only Yes/No to go in (by using a control) but where it is stored as text or to use a gallery instead of the data table. 

 

You can make a gallery do just about anything a data table can with alot more customizing options. That is the route I would take if it were me. Best of luck!

Highlighted
Community Support
Community Support

Re: How to change DataTable column to display Yes or No when the data type on list is a yes/no

Hi @patty789 ,

 

Did you make sure that your data source is SharePoint list? I just tested with SharePoint Yes or No column and by default it shows as below in a data table control:

Capture.JPG

 

Try to delete this field from data table and add it again to test.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Helper IV
Helper IV

Re: How to change DataTable column to display Yes or No when the data type on list is a yes/no

@v-monli-msft Thank you for your response. I end it up changing the column in the SharePoint list to a choice type and that worked for me. I had it as a YES/NO type in the sharepoint list. Thank you for all your help

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (9,131)