multiplicate row if a multiselect field contains more than one value

Joachim Mund
Joachim Mund ✭✭✭✭✭✭
edited 11/09/21 in Smartsheet Basics

Hi community,

I would like to multiplicate rows depending on the values of a multiselect field "Values".

e.g.:

1) field multiselect "Values" can contain a, b, c

2) if a single value a, b or c is selected, there is no need to multiplicate the row

3) if more than one value is selected

3a) the original row should remain

3b) for each value in "Values" the row should be duplicated

3c) a helper column "copied value" should contain the value e.g. a, b, or c


I tried some ways by the help of a second helper table and workflow "copy row", but I had problems with disabled workflow after the first run and with setting of values, because there is no following action (copy row) possible.

Is there any one with a good idea or hints how to get this to work?

Thank you very much, Joachim

Answers

  • Hi @Joachim Mund

    I believe you're on the right track with helper sheets and workflows, you would just need to make sure they don't create a loop (which is why they're disabling).

    You would want one sheet per-value. Then set up an individual Copy Row workflow to each of the sheets depending on if the Multi Select has one of the values. You would also want a Helper Column in your sheet that counts how many values are in the Multi-Select, so if there's only one it skips that row:



    Then the tricky bit is in the other sheet. You will first need to have a Clear Cell Workflow which removes all of the Multi-Select values.

    Then you can use the Change Cell workflow triggered when the Multi column has been changed to add the value in to your Copied Value column.

    Finally, set up your third workflow to copy the row when the Copied Value column changes to the Value:


    The reason you need to Clear the Multi column is so that it doesn't re-trigger the original Copy Workflow when it's added to your original sheet. Those copied rows would have a value of 0 in the Helper Count column:


    Cheers,

    Genevieve

    Join us at Smartsheet ENGAGE 2024 🎉
    October 8 - 10, Seattle, WA | Register now

  • Joachim Mund
    Joachim Mund ✭✭✭✭✭✭

    Hi @Genevieve P. great work and this sounds good.

    I will test this in the next days and will give you a feedback.

    Cheers, Joachim