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.

Why no Parent() object in Formulas?

Options
Rush Austin
edited 12/09/19 in Archived 2016 Posts

I would like to default a value in child row based on a column value in the parent row.  

 

Meta-Code:

     IF Parent()[Column Name]='valueX'

     THEN Child()[Column Name]='valueX'

 

Can someone walk me through the syntax for that?

 

Comments

  • Christian Wells
    Options

    Hi Rush,

     

    Because the parent is a single row you can add a formula like.

    With the parent row on Row 5

     

    =IF($[ColumnName]$5 = "<Something>", "Value X", "Value Y")

     

    Note the $ fix the cell like Excel.

     

    When you add another child the formula will automatically populate.

    If the Parent Row moves the Cell reference will move with it..

  • Rush Austin
    Options

    Thanks Christian.  I think I can work with that model.

     

    However, if I insert a new (empty) row under Parent 1, the formula is not being applied.  It's a quick copy/paste, but I would love for any child to automatically inherit certain aspects from its parent.

     

    Thanks again.

  • Christian Wells
    Options

    I have found that under certain circumstances the formula's do populate down...

    What those circumstances are exactly ?? Im not 100% sure.

     

    Perhaps it is better explained somewhere or Another has a good understanding of this.

     

    On the mini-sheet I built for your test it did actually work....Sorry.

     

  • J. Craig Williams
    J. Craig Williams ✭✭✭✭✭✭
    Options

    See this article on Auto-Fill

     

    http://help.smartsheet.com/customer/portal/articles/1641473

     

    Basically, if there is formatting above or below the new row, the formula/formatting gets auto-filled.

     

    Craig

  • Rush Austin
    Options

    Hi Craig.  

    Thanks for the link.  Is Auto-Fill supposed to be enabled by default?  Newly added rows are definitely not inheritting the row background color or cell formula from the rows above it. Confirmed that the formula in question exists in the same cell for all the rows above the newly added row.

     

    Best

  • Rush Austin
    Options

    Craig/et al,

    Please disregard.  Inserting a new row between existing rows DOES inhert from the rows above it. YAY!  Adding a new row to the bottom of a set of rows does not seem to.

     

    Thanks again for your time and attention

  • J. Craig Williams
    J. Craig Williams ✭✭✭✭✭✭
    Options

    Rush,

     

    It should.

    Do you have any empty rows at the bottom that might be messing with the auto-fill.

     

    Craig

  • Kim Bennett
    Options

    It would be so much easier to have a parent() just like children()!  I get the workaround but its a pain

This discussion has been closed.