Welcome to the Smartsheet Forum Archives
The posts in this forum are no longer monitored for accuracy and their content may no longer be current. If there's a discussion here that interests you and you'd like to find (or create) a more current version, please Visit the Current Forums.
Formula for Parent, Child, and Non-parent/child rows
I need a formula that encompasses all three of the scenarios listed below. In my case, I have a Project ID system-generated column and a Rep_Project_ID column for grouping related tasks. I want parent rows and non-parent/non-child rows to copy the same-row Project ID and child rows to copy the parent Rep_Project_ID number.
Criteria for the formula:
- 1. If there are children (number of children greater than 0), I'm a parent. And I should have a Project_ID, so grab that.
2. If I am a child, grab the Rep_Project_ID from the row above me.
3. If I am not a parent or a child, I should have a Project_ID, so grab that.
I am new to formulas, and what I have so far is returning an error (example for row 6):
=IF(OR(COUNT(CHILDREN([Primary Column]6)) > 0, (COUNT(CHILDREN([Primary Column]6)) <> 0), [Project_ID]6, [Rep_Project_ID]5))