Custom Column to state if a task is a parent task | Community
Skip to main content
Level 3
April 25, 2024
Question

Custom Column to state if a task is a parent task

  • April 25, 2024
  • 2 replies
  • 831 views

When using the "Parent" Field in a Task View it displays the project name when the task is a parent task. We're aiming to display "Parent Task" when the "Parent" field matches the project name, indicating it is a parent task. Otherwise, it should display the task name, indicating it's a child task. Here's is the calculated column formula I've been trying but is not working:

 

displayname=Parent Task
textmode=true
valueexpression=IF({backlogParent}={project:name},"Parent Task",{backlogParent})
valueformat=HTML

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

KristenS_WF
Level 6
April 25, 2024

I can't get backlogParent to work in a valueexpression (only as valuefield), but does this get what you want?

 

displayname=Parent Task
textmode=true
valueexpression=IF({numberOfChildren}>0,"Parent Task",{parent}.{name})
valueformat=HTML

 

JohnMiAuthor
Level 3
April 26, 2024

Thank you, but that does not work either. I also tried:

 

displayname=Parent Task

textmode=true
valueexpression=IF({backlogParent}={project:name},"Parent Task",{backlogParent})
valueformat=HTML

NicholeVargas
Adobe Employee
Adobe Employee
April 26, 2024

@johnmi I'm curious as to how your project timelines are structured - are all tasks within the project timeline organized by a parent-child relationship? Or do you have standalone tasks with no parent and no children (meaning the real parent task is the project name)? 

If the first option, then you can use the following:

displayname=Parent/Child Tasks textmode=true valueexpression=IF({numberOfChildren}>0,"Parent Task",{name}) valueformat=HTML

If the latter option, how would you want those displayed in your report? Because they have no child tasks, they aren't really a parent task, so the project name would be the parent.