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.
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
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:
Add style 1:
=If(MOD($[ID column data],2)=0,TRUE,FALSE) and color code this to Green
Add style 2:
=If(MOD($[ID column data],2)<>0,TRUE,FALSE) and color code this to Red
After adding the styling, Display section will look like this:
The following is how it will look in actual use:
This works but requires this unique id solution which itself requires maintaining a separate identity table for each table you want to style. 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.
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.