Coloring alternate row

  • 0
  • 2
  • Question
  • Updated 2 years ago
  • Answered
Is there a native way to colour each alternate row in a timeline report? 
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,152 Points 3k badge 2x thumb

Posted 3 years ago

  • 0
  • 2
Photo of Matthew Neil

Matthew Neil

  • 31,698 Points 20k badge 2x thumb
Natively and Perfectly, no.

But here is a sneaky workaround for another option.

If(Rem([Record ID#], 2)=0, "#EvenColor", "#OddColor")

This will basically will devide the record id by 2 and if there is no remainder, then it will color one, or the odd color.

It works as long as you have one of the sorting things to go by record ID, first or last.

Or if you have some field that sequentially grows you can use that as well.

Just Ideas.
Great! Love your skills Buddy :) :)
Matthew - this is brilliant in its simplicity. Love it. =]
Photo of Peter

Peter

  • 50 Points
Hi there, 2 questions - can you colour rows dependent on the resource (assigned to) using a variation of the above? Secondly, where do you put the code??
Hi Peter,

Just customise the report and put the code in the row colorization under the Record highlight option.

Please let me know if you need any further help.

Thanks,
Gaurav 
Photo of Peter

Peter

  • 50 Points
Thanks - any clue on how to code a colour change for each different assigned to record?
Photo of Peter

Peter

  • 50 Points
also - seems no area for coloration on timeline report :-(
Photo of Matthew Neil

Matthew Neil

  • 31,698 Points 20k badge 2x thumb
If your "assigned to" resource is via a relationship,...

Create a new field on the resource table, call it something like [Color]
Put the custom color hex (#xxxxxx) there, then pass that value to the main table (tasks or jobs, whatever you have it called).

Then in the report settings you can select the checkbox for 'colorization' towards the bottom, the simply insert that new lookup field [Resource - Color]
Actually, peter is using timeline report and there is no option for colorization. :)