New Table Style : Dynamic conditional colors to tags

There is a feature where you can put tags to rows of data with colors (of your choice) based on conditions. (Note: Glide offers different default colors too but in my experience, wherever there is a color, client will ask you to put his/her/their favorite colors. So the Steps are as follows:

  1. In the Data Editor, in the Data Source Table, put an IF-THEN-ELSE Column beside the Value Column and put the color rules. In my case, the client needed Blue, Orange and Green for 3 specific cases.
  2. Set a New Table style to your data.
  3. Set the value to desired column.
  4. Select Type as ‘Tag’
  5. Select appropriate Data Source and Value.
  6. In Tag Color, choose ‘Manual’
  7. And finally, in Color choose the IF-THEN-ELSE Column.

Ta-da! Your dynamic color tags are ready!

Special Thank you to @Juanesngtz for guiding me on this.

Happy Innovation to all of us! Hope this helps. Also, please feel free to share alternatives to this solution.

9 Likes

:partying_face: Awesome!!! Thanks for sharing this!

2 Likes

Is it a bit shrinking in size…?

Thanks for sharing!

Hola!

I was using this great component yesterday and I think I found 2 bugs:

If you use the Tag or Choice features (Type) and the column where the value will be saved/read is empty, nothing is shown unfortunately.
The Choice/Tag component must show at least the options (list) if the Edit parameter is marked but nothing happens.

If you use USC the situation is worse, those are blank/empty in the beginning and the component New Table can’t work with them if the Tag/Choice feature is selected.

Saludos!

2 Likes

This is only for classic apps, right? because I couldnt find it in pages

You need to enable ‘New Tables’ in previews.

Hola!

As Jeff mentioned it before, just enable ‘New Tables’ in Preview features.

2 Likes

Thank you. I’ve found it, it’s great! :0

2 Likes

What if I have several values in the same row ? I would like to have different colours for each value. How to do so ?

So you mean you have an array of values for a single column and you want to control the color of those?

Have a column in a helper table to list out those values, and one column to set the color of those values. Then refer that in your tag column’s setup.

1 Like

Working great, thanks a lot

1 Like

Would love to be able to do conditional formatting on a whole row of a table / data grid based on a single value.

1 Like

Hi team,
in my app dont work the tags colors, please help me


I’m not sure how you are trying to use that if-then-else column, but here is what you need:

  • Firstly, a couple of columns in a table somewhere that map values to colours, like so:

  • Then you configure your Tag column like so:

2 Likes

Thanks for the support

Also, make sure your actual column’s values match the data source’s values. In many cases you would just point to the same column, but if values don’t match, I recall it defaulting to a single color for those unmatched values.

1 Like