Looking for solution to "Parent vs Ancestors" problem
Hello,
I have been having tons of trouble coming up with a formula that will give me the desired result. The goal, it to populate a column with two pieces of information from other columns.
In the attached image, the column "project name and header" is supposed to take the ancestor of SLS Job Number and the ancestor of Project, and combine them with a "-" in the middle.
I have tried several formulas, but none are giving the desired results. As seen in the attached photo, I cannot seem to find out how to not include the subheaders from the parent rows.
Does anyone have any ideas?
Best Answer
-
@LelandSwift Does this tutorial video help you?
Darren Mullen "Smartsheet Guru", Member, Smart Consulting Services LLC
Get my 7 Smartsheet tips here
Author of: Smartsheet Architecture Solutions
Answers
-
@LelandSwift What is the formula that you are currently using?
Darren Mullen "Smartsheet Guru", Member, Smart Consulting Services LLC
Get my 7 Smartsheet tips here
Author of: Smartsheet Architecture Solutions
-
@Darren Mullen The current column formula is If (ancestors@row < 1, [SLS Job Number]@row + "-" + Project@row, PARENT([SLS Job Number]@row) + "-" + PARENT(project@row))
The ancestors row is just an ancestor count. I recognize that the PARENT function will only ever give me the subheaders, but couldn't use ANCESTOR in the same place without error. I guess ultimately, I am looking for a way to return the parent, if there is only one ancestor, or the parent of the parent, if there is more than one. Thanks for the help!
-
@LelandSwift Does this tutorial video help you?
Darren Mullen "Smartsheet Guru", Member, Smart Consulting Services LLC
Get my 7 Smartsheet tips here
Author of: Smartsheet Architecture Solutions
-
@Darren Mullen Thank you, this worked perfectly. It was the index function, alongside the fact that Ancestors is a range that really helped. The example in the video you linked was absolutely perfect! I appreciate your help!
-
@LelandSwift Great! Glad that it worked for you. Thanks for the inspiration for me to make another video :)
Darren Mullen "Smartsheet Guru", Member, Smart Consulting Services LLC
Get my 7 Smartsheet tips here
Author of: Smartsheet Architecture Solutions
Help Article Resources
Categories
Check out the Formula Handbook template!