Set up automated workflow to copy child rows to another sheet?

mconne17101921
edited 06/16/20 in Smartsheet Basics

I have a sheet set up with parent rows for each month. I want to copy the child rows underneath the "July" parent row to another sheet using an automated workflow. What condition do I set if I want the rows under "July" to copy to the other sheet on the first of every month?


Best Answer

  • Ben Goldblatt
    Ben Goldblatt Employee
    Answer ✓

    Hi @mconne17101921,

    You would still need to use a "helper" column but if you don't want to use a date column for the helper, you could use a nested IF statement to populate a month number based off of the name of the month listed in the "Date Begin" column:

    =IF([Date Begin]@row = "January", 1, IF([Date Begin]@row = "February", 2, IF([Date Begin]@row = "March", 3, IF([Date Begin]@row = "April", 4, IF([Date Begin]@row = "May", 5, IF([Date Begin]@row = "June", 6, IF([Date Begin]@row = "July", 7, IF([Date Begin]@row = "August", 8, IF([Date Begin]@row = "September", 9, IF([Date Begin]@row = "October", 10, IF([Date Begin]@row = "November", 11, IF([Date Begin]@row = "December", 12))))))))))))

    You could also manually enter a number to correspond to the month. Once you have the numbers in place, the checkbox formula could reference the month number listed on the row. If the month number matches the month number of today's date, the box will check.

    =IF(MONTH(TODAY()) = [Month Number]@row, 1)

    The "Month Number" column could be hidden once your numbers are in there if you don't want the helper column to be visible in the sheet. I hope that helps!

    Ben

Answers

  • sravya.gupta127326
    sravya.gupta127326 ✭✭✭✭✭

    Hi - You could have a new field created to show parent (=parent(primary task column name)) and use that in your conditions to match July. This will work if you have just children rows at July and no further rows.

    Thanks,

    Sravya

  • Thanks for your response. We have a parent row for each month of the year, so I'd like the automation to happen every month, copying over all of that month's child rows. Could we do something with the "Date Begin" column?


  • Stefan
    Stefan ✭✭✭✭✭✭

    Hi,

    should be possible with one automation having condition paths for every month.

    In your workflow click on the first + below the trigger section and add another condition...

    Hope this helps

    Stefan

    Smartsheet Consulting, Solution Building, Training and Support.

    Projects for Processes and for People.

  • Andrée Starå
    Andrée Starå ✭✭✭✭✭✭

    Hi @mconne17101921

    Another option could be to add a so-called helper column (checkbox) that checks if the month is the current month, and then that would trigger the copy row automation.

    I hope that helps!

    Be safe and have a fantastic week!

    Best,

    Andrée Starå

    Workflow Consultant / CEO @ WORK BOLD

    Did my post(s) help or answer your question or solve your problem? Please help the Community by marking it as the accepted answer/helpful. It will make it easier for others to find a solution or help to answer!

    SMARTSHEET EXPERT CONSULTANT & PARTNER

    Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

    W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35

    Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

  • Hi @Andrée Starå!

    I like your idea, but I'm wondering if there's a way to create a formula that checks the helper checkbox if the month is current month without have to add another helper column that has the date column type? I found the formula below on a different discussion, which works if I were to add another helper column that says "6/1/20" for each row that has "June" in the "Date Begin" column (for example). It would be nice to have a formula like the one below that works with just the name of the month instead an actual date (to keep the sheet as an evergreen template to use year after year).

    =IF(AND(MONTH([Date Column]@row) = MONTH(TODAY()), YEAR([Date Column]@row) = YEAR(TODAY())), 1)

    Do you know if that's possible?

    Thanks!

    Megan

  • Ben Goldblatt
    Ben Goldblatt Employee
    Answer ✓

    Hi @mconne17101921,

    You would still need to use a "helper" column but if you don't want to use a date column for the helper, you could use a nested IF statement to populate a month number based off of the name of the month listed in the "Date Begin" column:

    =IF([Date Begin]@row = "January", 1, IF([Date Begin]@row = "February", 2, IF([Date Begin]@row = "March", 3, IF([Date Begin]@row = "April", 4, IF([Date Begin]@row = "May", 5, IF([Date Begin]@row = "June", 6, IF([Date Begin]@row = "July", 7, IF([Date Begin]@row = "August", 8, IF([Date Begin]@row = "September", 9, IF([Date Begin]@row = "October", 10, IF([Date Begin]@row = "November", 11, IF([Date Begin]@row = "December", 12))))))))))))

    You could also manually enter a number to correspond to the month. Once you have the numbers in place, the checkbox formula could reference the month number listed on the row. If the month number matches the month number of today's date, the box will check.

    =IF(MONTH(TODAY()) = [Month Number]@row, 1)

    The "Month Number" column could be hidden once your numbers are in there if you don't want the helper column to be visible in the sheet. I hope that helps!

    Ben

  • Andrée Starå
    Andrée Starå ✭✭✭✭✭✭
    edited 07/24/20

    Hi @mconne17101921

    Try something like this.

    =IF(MONTH([Date Column]@row) = MONTH(TODAY()), 1)

    Would that work?

    I hope that helps!

    Be safe and have a fantastic weekend!

    Best,

    Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

    Did my post(s) help or answer your question or solve your problem? Please help the Community by marking it as the accepted answer/helpful. It will make it easier for others to find a solution or help to answer!

    SMARTSHEET EXPERT CONSULTANT & PARTNER

    Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

    W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35

    Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.