Building an if statement off a specific ancestor
We use smartsheet to manage our content planning across several channels and teams using parent/child as an organizational method. I'm trying to build a filter out to show only projects and tasks that fall under a specific top-level (level 0) project.
I'd like to build a formula (likely an if statement?) that returns the label "Campaign" for all items (child and grandchild tasks) that fall under a specific ancestor (in this case, All Campaign Work).
Doing so will allow us to filter our view to only show projects and tasks that fall under that ancestor.
I've attached a sample image of the sheet.
Thanks in advance for your help!
Answers
-
Hey @Laura Mantzoros
Try this in your [Filter Label] column
=IF(COUNT(ANCESTORS()) = 0, "Campaign", PARENT())
Once 'Campaign' is inserted in the top level row, "Campaign" is cascaded downward. If you think you will use the Ancestors level in more scenarios, consider building a helper column for the Ancestors and insert the =COUNT(ANCESTORS()) into
cheers,
Kelly
-
Thanks @KDM !
I'm still learning my way around smartsheet. How would I build in the helper column logic?
For reference, I tried building out an if formula to reference the specific ancestor, but it returned unparseable.
-
Hey @Laura Mantzoros
I just stumbled on your second question. I am so sorry for the delay - I don't know how I didn't see this when it first came across. Are you still needing a solution?
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 439 Global Discussions
- 138 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!