Conditional Formatting for Parent AND Grandparent Tasks | Community
Skip to main content
Mikaela-Newell
Level 2
January 12, 2025
Solved

Conditional Formatting for Parent AND Grandparent Tasks

  • January 12, 2025
  • 1 reply
  • 930 views

Hi all!

I'm customizing my project task-level view. I know that I can change the color of a parent or grandparent task's row by setting conditional formatting (task's Number of Children > 0). However, I'm looking to set parents and grandparents to different colors. The Number of Children variable tells you how many subtasks there are... not useful here. I need a variable that denotes the "level" of a task (ex. task=1, parent=2, grandparent=3, greatgrandparent=4). I'm fairly comfortable with text mode and API basics but just can't figure this one out 😞

Extra credit portion: Ideally I'd like to flip parent+ task rows into white text on dark backgrounds, but rich text fields don't change color. Is there a way to override that?

Thanks in advance!!

Best answer by Doug_Den_Hoed__AtAppStore

 

Hi @mikaela-newell,

 

Since conditional formatting resolves top to bottom, you could start with a rule that checks for Number Of Children = 0 (and "does nothing special" for formatting), then sets the back color based upon the Index.

 

Regards,

Doug

1 reply

Doug_Den_Hoed__AtAppStore
Community Advisor
Community Advisor
January 12, 2025

 

Hi @mikaela-newell,

 

One way is to conditionally format each Task's row based upon its "Indent" (ie the Level of indentation you were after), e.g. 4 = lightest blue, 3 = light blue, 2 = blue, etc.

 

To my knowledge, no bueno on the Rich Text formatting.

 

Regards,

Doug

Mikaela-Newell
Level 2
January 12, 2025

A lot closer, but no cigar. I only want to highlight parents; using indent level highlights all tasks at a tier level, including non-parents.

Maybe there's a way to do something like "if indent level 0 AND next task indent level 1, then format"? And then duplicate that rule using 1,2 and 2,3?

Level 2
July 18, 2025

 

Hi @mikaela-newell,

 

Since conditional formatting resolves top to bottom, you could start with a rule that checks for Number Of Children = 0 (and "does nothing special" for formatting), then sets the back color based upon the Index.

 

Regards,

Doug


I concur this is the right solution! We've been doing this one for years starting with Number of children= 0, then using indent #'s to color the remaining parent/grandparent tasks to keep the levels consistent. I think we programmed 7 indent's deep to cover just about any amount of sub-leveling a project manager needed to keep tasks organized and we've never gone more than 5.