Bridge to update column ID in column description

Neil Watson
Neil Watson Community Champion
edited 07/07/23 in Add Ons and Integrations

Hi @Genevieve P.

I am looking to develop a "utility" workflow that I can use when developing solutions.

My idea is to use the "List Columns" element to gather the column ID's, and then a child workflow and "Update Columns" to update cycle through {{states.listcolumns.smartsheet.list_columns.data.x.column_id}} where x is the column number.

Is this possible?

The end state would be all columns having the their ID as per below:

image.png


Best Answers

  • Genevieve P.
    Genevieve P. Employee
    Answer βœ“

    Hi @Neil Watson

    Great idea! Yes, this is definitely possible, and I would do it exactly as you said.

    "List Columns"

    Screenshot 2023-07-07 at 13.14.59.png


    Then you can use the Array from the List Columns output as the Number of Runs in your Child Workflow Module:




    Screenshot 2023-07-07 at 13.15.51.png


    In your Child Workflow, all you would need to do is include the {{runtime.data.column_id}} as both the Column ID and the Column Description in an Update Column module.





    I've hard-coded the sheet ID in there but you can make that dynamic as well depending on how you're passing that through the Parent workflow.

    Screenshot 2023-07-07 at 13.18.07.png

    Cheers,

    Genevieve

    Need more information? πŸ‘€ | Help and Learning Center

    こんにけは (Konnichiwa), Hallo, Hola, Bonjour, OlΓ‘, Ciao!πŸ‘‹ | Global Discussions

  • Genevieve P.
    Genevieve P. Employee
    Answer βœ“

    Awesome! Yes, exactly!

    Need more information? πŸ‘€ | Help and Learning Center

    こんにけは (Konnichiwa), Hallo, Hola, Bonjour, OlΓ‘, Ciao!πŸ‘‹ | Global Discussions

Answers

  • Genevieve P.
    Genevieve P. Employee
    Answer βœ“

    Hi @Neil Watson

    Great idea! Yes, this is definitely possible, and I would do it exactly as you said.

    "List Columns"

    Screenshot 2023-07-07 at 13.14.59.png


    Then you can use the Array from the List Columns output as the Number of Runs in your Child Workflow Module:




    Screenshot 2023-07-07 at 13.15.51.png


    In your Child Workflow, all you would need to do is include the {{runtime.data.column_id}} as both the Column ID and the Column Description in an Update Column module.





    I've hard-coded the sheet ID in there but you can make that dynamic as well depending on how you're passing that through the Parent workflow.

    Screenshot 2023-07-07 at 13.18.07.png

    Cheers,

    Genevieve

    Need more information? πŸ‘€ | Help and Learning Center

    こんにけは (Konnichiwa), Hallo, Hola, Bonjour, OlΓ‘, Ciao!πŸ‘‹ | Global Discussions

  • Neil Watson
    Neil Watson Community Champion

    Hi @Genevieve P.

    Thanks - very clear explanation and worked correctly first try!

    It's not a major issue to hard code the Sheet ID, but out of interest how do you make the sheet ID from the parent pass through dynamically to the child workflow?

  • Neil Watson
    Neil Watson Community Champion

    Hi @Genevieve P.

    I think I worked this out. I included the "Get Sheet"module into the parent, and then used the Sheet ID reference in a key I called "ParentSheetID".

    image.png

    The child trigger then contains this Key, which I use in that workflow.


    image.png


    Is that correct?

  • Genevieve P.
    Genevieve P. Employee
    Answer βœ“

    Awesome! Yes, exactly!

    Need more information? πŸ‘€ | Help and Learning Center

    こんにけは (Konnichiwa), Hallo, Hola, Bonjour, OlΓ‘, Ciao!πŸ‘‹ | Global Discussions