Combining Arrays in Bridge

Garrett Henke
Garrett Henke ✭✭✭✭✭
edited 09/08/23 in Add Ons and Integrations

Currently I have a Bridge workflow that updates a dropdown list with job numbers anytime the Job Name & Number Master List sheet is updated. This sheet only contains active jobs and is used to update multiple dropdown lists. For this specific dropdown list I need to add 14 static repair account numbers that will never change. Since the Master List sheet is used for multiple dropdown lists I cannot add the 14 repair accounts to the master list.

In Bridge is there a way to take the array from the master list containing the job numbers and the array containing the repair accounts and combine them into one single array that i can then use to update the dropdown list? I would want to add the repair accounts to the bottom of the job name & numbers list.

Tags:

Best Answer

  • Diana Yeh
    Diana Yeh Employee
    Answer ✓

    Hi @Garrett Henke ,


    I think the only thing we have close to this is the Array Management extension module Add Object to Arrayand it would only work if the array is a list of objects i.e.

    [
      {
        "id":"1",
        "name":"name 1",
       },
      {
        "id":"2",
        "name":"name 2",
       }...
    ] 
    

    Use the Add Object to Array to add extra items to it, but it would have to be done 14 times and would need to be manual. This will work if your static account numbers are at the bottom of your list rather than at the top.

    If you need your solution to work with your static values at the top and your dynamic ones at the bottom, please submit an Enhancement Request for a Merge Array module to our team to evaluate for future releases!

Answers

  • Diana Yeh
    Diana Yeh Employee
    Answer ✓

    Hi @Garrett Henke ,


    I think the only thing we have close to this is the Array Management extension module Add Object to Arrayand it would only work if the array is a list of objects i.e.

    [
      {
        "id":"1",
        "name":"name 1",
       },
      {
        "id":"2",
        "name":"name 2",
       }...
    ] 
    

    Use the Add Object to Array to add extra items to it, but it would have to be done 14 times and would need to be manual. This will work if your static account numbers are at the bottom of your list rather than at the top.

    If you need your solution to work with your static values at the top and your dynamic ones at the bottom, please submit an Enhancement Request for a Merge Array module to our team to evaluate for future releases!

  • Diana Yeh
    Diana Yeh Employee

    @Garrett Henke,

    There was another suggestion that just came up:


    You could try using a new sheet to combine the arrays.

    1. In a new sheet, manually write the static list of repair account numbers as comma separated list in a column named “Repair Account Numbers”
    2. Use Bridge to write the array of job numbers as a comma separated list to a column named “Job Numbers”
    3. alternatively (if possible), use a formula to get the active jobs from the other sheet
    4. In the next column, use a formula to combine the lists. i.e. ="[" + [Repair Account Numbers]1 + ", " + [Job Numbers]1 + "]"
    5. Use Bridge (via trigger) to add that combined list to the other sheet as dropdown values


    Hope one of these suggestions work!