Skip to main content

Notifications

Community site session details

Community site session details

Session Id : PPk4ioXRAp+KNf8bbs2/aX
Power Apps - Building Power Apps
Answered

colour row of the table

Like (0) ShareShare
ReportReport
Posted on 8 Jun 2020 11:11:28 by 90
is it possible to color the rows of a table, when a value changes between one row and another?
Thank's in advance
Categories:
  • eka24 Profile Picture
    20,921 on 10 Jun 2020 at 09:48:19
    Re: colour row of the table

    If you have the colors in your SQLTable example ColorColumn, then in the Template fill put:

    ColorValue(ThisItem.ColorColumn)

     

    ------------

    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.

  • WarrenBelz Profile Picture
    146,745 Most Valuable Professional on 10 Jun 2020 at 09:39:53
    Re: colour row of the table

    OK @gioce ,

    That's sort of what I posted except for the hex bit.

    Yo can set Variables with Hex colours

    Set(
     vColor1,
     ColorValue("#24e34a")
    )

    is a light green - your conditional TemplateFill would be vColor1.

    All you need to do is Lookup your table for the colour you need.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

  • gioce Profile Picture
    90 on 10 Jun 2020 at 09:24:15
    Re: colour row of the table
    I apologize, but perhaps I have not been clear in the exhibition. I want the individual rows to be colored differently depending on the type of visit they find, taking the color (in hexadecimal) from the sql table
     
     
  • WarrenBelz Profile Picture
    146,745 Most Valuable Professional on 10 Jun 2020 at 08:37:09
    Re: colour row of the table

    @gioce ,

    Who are you responding to here? Alternate rows as per @mdevaney 's post will work if the gallery is sorted in ID order and you want every second row coloured (but not for other sorts).

    My solution will work if you want items with a specific value shaded.

    You have marked @eka24 's as the solution.

    Your picture refers to none of these and none require selecting the gallery item.

  • gioce Profile Picture
    90 on 10 Jun 2020 at 08:27:44
    Re: colour row of the table
    hi, I tried with this string but in fact the field is colored only when I click on it. Is there a way to see the fields of all the rows directly colored, without clicking on them? Thanks in advance
  • mdevaney Profile Picture
    29,987 Super User 2025 Season 1 on 08 Jun 2020 at 11:22:19
    Re: colour row of the table

    @gioce 

    Put this code in the TemplateFill property of your gallery.  It will work assuming each row has an ID number.

     

    If(Mod(ThisItem.ID,2)=1, White, Blue)

     

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Verified answer
    eka24 Profile Picture
    20,921 on 08 Jun 2020 at 11:20:27
    Re: colour row of the table

    I guess you are referring to a Datatable?

    If you are using a Datatable, there are limitations so son cannot do that.

     

    If you are using a Gallery, you can arrange the labels inside the Gallery to look like a Datatable. With that you can use the color.

     

    You may have to give more information on the conditions under which you want the color.

    ------------

    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.

  • WarrenBelz Profile Picture
    146,745 Most Valuable Professional on 08 Jun 2020 at 11:19:44
    Re: colour row of the table

    Hi @gioce ,

    You can colour the row of a gallery with the TemplateFill setting. If for example you wanted all values in a field called Status where the value was Complete to be coloured Yellow, you would put n the TemplateFill of the Gallery

    If(
     ThisItem.Status="Compete",
     Yellow,
     White
    )

    Is this what you are asking?

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard