Populating parent and child rows with the same data

I am trying to pull data from the parent row in column "helper VRN" into both the parent and child cells in column "Verification Request Number" - I need to use a single formula because it needs to work for all rows, which may be pasted or added via a form, so I want to make it a column formula. This is the formula I have tried

=IF(COUNT(CHILDREN([helper VRN]@row)) = 0, PARENT([helper VRN]@row), [helper VRN]@row)

If this, (COUNT(CHILDREN([helper VRN]@row)), equals "0" the formula will populate the child rows. If it equals "1" the formula will populate the parent row but I can't get it to populate both parent and child.

Can someone tell me what I am doing wrong? I would appreciate any help on this.

Thanks

Best Answer

  • Genevieve P.
    Genevieve P. Employee
    Answer ✓

    Hi @Tamsin

    Your formula is working correctly! In your screen capture, there are blank cells in helper VRN column for the child rows. This means the COUNT of the CHILDREN in that specific column is 0, since there is no data in those child rows.

    Instead of referencing your helper column in the first COUNT, make sure you're referencing a column that will always contain text or data when a row is submitted. For example:

    =IF(COUNT(CHILDREN([Primary Column]@row)) = 0, PARENT([helper VRN]@row), [helper VRN]@row)


    Does that make sense?

    Cheers,

    Genevieve

    Need more help? 👀 | Help and Learning Center

    こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!