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 / Power Apps: Manipulate...
Power Apps
Answered

Power Apps: Manipulate row text/fill colour based on values in SharePoint online item columns

(0) ShareShare
ReportReport
Posted on by 17

Hi,

 

Does anyone know how to automate the colour of a row based on the value of an item in a DataTable?

 

Example:

 

Colour: If(Status = "Published", Green, Black)

 

IDNameStatus
1KatiePending
2StevePending
3SarahPublished

 

The content of the data table is pulled from a SharePoint Online custom list. 

 

Categories:
I have the same question (0)
  • Rahber Profile Picture
    1,935 on at

    Hello,

     

    This is currently not possible on Datatable. My advice would be to use Gallery.

     

    There is a post in Ideas forum to enable this feature on Datatable. You can view it here: https://powerusers.microsoft.com/t5/Power-Apps-Ideas/datatable-control-row-color-Fill/idi-p/382768

     

    Please click Accept as Solution if it resolved your problem or give it a Thumbs Up if it helped you in anyway this will allow other people to search correct solutions effectively.

    Thanks,

    Rahber

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi@GeorgeLong94,

    Based on the issue that you mentioned, do you want to color the selected row within the DataTable?

    There is a property named "SelectedColor" which means the color of the text in the selected row in the Data table control. I think you can achieve this by "SelectedColor" property.

    • Set the SelectedColor property of the Data Table as below

     

    If(DataTable3.Selected.Status.Value="Published",Green,Black)

    Note: 'Status' column in my SP list is a Choice column, so l quote it as the format of "DataTable3.Selected.Column.Value". If yours is a Text column, please modify the formula as below.

    If(DataTable3.Selected.Status="Published",Green,Black)

    0629GIF.gif

     

    Best Regards,

    Qi

     

  • GeorgeLong94 Profile Picture
    17 on at

    Hi,

     

    Thanks for your reply! I understand how this formula can update the colours when a user selects a row.


    What I'm after is the colours to update automatically based on the column values pulled through from the SharePoint Online list, similar to how Conditional Formatting works in a normal Excel Spreadsheet. 

     

    Do you think this is possible? 

  • Verified answer
    eka24 Profile Picture
    20,925 on at

    Instaed of Datatable with limitation, Use a Gallery. Arrange the labels to loom like a Table then apply the conditional formatting:

    If(ThisItem.Description="Klectrica",Blue,RGBA(0, 0, 0, 0))
     
    ColorGallery.JPG
    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
  • GeorgeLong94 Profile Picture
    17 on at

    I've replicated my table using a Gallery rather than a DataTable and it's 10 times better!

     

    Thank you for your help all

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Now how can you filter the gallery by color fill, I am traying and just create circular references. 

     

    Help

  • knsrinath Profile Picture
    527 on at

    Hi @eka24

    Is there any possibility to have Horizontal & Vertical scroll bars both in one gallery like Datatable.

     

    Thanks & Regards  

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 294 Most Valuable Professional

#2
11manish Profile Picture

11manish 210

#3
Valantis Profile Picture

Valantis 169

Last 30 days Overall leaderboard