Bridge to update column ID in column description

Options
Neil Watson
Neil Watson ✭✭✭✭✭✭
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:


Best Answers

  • Genevieve P.
    Genevieve P. Employee Admin
    Answer ✓
    Options

    Hi @Neil Watson

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

    "List Columns"


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





    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.

    Cheers,

    Genevieve

  • Genevieve P.
    Genevieve P. Employee Admin
    Answer ✓
    Options

    Awesome! Yes, exactly!

Answers

  • Genevieve P.
    Genevieve P. Employee Admin
    Answer ✓
    Options

    Hi @Neil Watson

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

    "List Columns"


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





    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.

    Cheers,

    Genevieve

  • Neil Watson
    Neil Watson ✭✭✭✭✭✭
    Options

    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 ✭✭✭✭✭✭
    Options

    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".

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



    Is that correct?

  • Genevieve P.
    Genevieve P. Employee Admin
    Answer ✓
    Options

    Awesome! Yes, exactly!