Pulling Parent Task Name and Child name to New Column
Hello!
I am trying to populate a new column that includes the parent and child task names together. Ideally the column would work in this format:
Parent Task
Parent Task - Child Task 1
Parent Task - Child Task 2
I tried using this formula: =PARENT([Project (Level 1)/Task or Milestone (Level 2)]@row) + " - " + [Project (Level 1)/Task or Milestone (Level 2)]@row
But that pulls in the - at the front of the parent task in the new column. is there a formula format that would only pull the - in when there is a child task after the parent?
Best Answer
-
Hi @kendallmar,
Let's try wrapping it in an IF statement, so it only uses the delimiters when there is a parent:
=IF(COUNT(ANCESTORS()) > 0, JOIN(ANCESTORS([Primary Column]@row), " - ") + " - " + [Primary Column]@row, [Primary Column]@row)
BRgds,
-Ray
Answers
-
Hi @kendallmar,
Try this:
=JOIN(ANCESTORS([Primary Column]@row), " - ") + " - " + [Primary Column]@row
Replace the two instances of the name "Primary Column" with your own Primary Column name.
Alternately you could also replace delimiter I used which is " - " with another like " , " if you would like a comma instead of a dash in-between values.
BRgds,
-Ray
-
I tried that formula but it is still pulling in a - in before the parent task, but it is correct for the child rows. The column looks like this now
the column on the left is the new Task name column I would like to us for filtering and the column on the right is the existing task name column
-
Hi @kendallmar,
Let's try wrapping it in an IF statement, so it only uses the delimiters when there is a parent:
=IF(COUNT(ANCESTORS()) > 0, JOIN(ANCESTORS([Primary Column]@row), " - ") + " - " + [Primary Column]@row, [Primary Column]@row)
BRgds,
-Ray
-
That worked!! Thanks so much for your help!!
-
Glad to hear it worked!
Happy to help.
Best of luck to you in your solutioning!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.2K Get Help
- 445 Global Discussions
- 143 Industry Talk
- 476 Announcements
- 5K Ideas & Feature Requests
- 84 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!