Alternating color styling by row index

Simply trying to set the alternating color of a Column List. Ideally, I could simply set the alternating color style like I would in excel. I tried setting a List condition where I use =MOD(???, 2)=1. How do I get the current index of the row? Everything I try seems to want me to know offsets or indexes which is exactly what I am trying to determine.

Hi @h-bomb,

Thanks for reaching out and welcome to the community.

Even though we don't have an out-of-the-box feature to support your request, I came up with the following way, the requirement is that you may need to maintain a unique identifier ID column.

Table with three columns, ID, First Name, and Last Name

Screen Shot 2021-09-13 at 2.55.45 PM

Using Column List in Builder, you can display the data from the above table, then select the segment from the list. Under Display > Conditional Styling, you can use the following conditions to color code alternate rows:

Screen Shot 2021-09-13 at 3.00.08 PM

Add style 1:
=If(MOD($[ID column data],2)=0,TRUE,FALSE) and color code this to Green

Screen Shot 2021-09-13 at 3.00.18 PM

Add style 2:
=If(MOD($[ID column data],2)<>0,TRUE,FALSE) and color code this to Red

Screen Shot 2021-09-13 at 3.00.28 PM

After adding the styling, Display section will look like this:

Screen Shot 2021-09-13 at 3.01.47 PM

The following is how it will look in actual use:

Screen Shot 2021-09-13 at 3.03.47 PM

This works but requires this unique id solution which itself requires maintaining a separate identity table for each table you want to style. :man_facepalming: Although I can appreciate the flexibility in Honeycode to allow for these solutions it does leave a lot to be desired from a no-code/low-code solution. IMO these should be standard out-of-the-box solutions.

Looks like I was able to overcome the unique id solution by using =MAX(Table1[Id])+1 when generating a new row. The problem now is that when I delete an item the stying is off since its based on the Id column rather than the current row number. :sob:

HI @h-bomb,

Thank you for your feedback. I can certainly see the value of having an inbuilt feature to conditionally format rows with colors. Please rest assured I'll forward your feedback to our product team.