Bridge - Pull Multiple contacts from one sheet & update one cell with all?

Options

I am trying to use Bridge to pull all the contacts (Supervisors) from a roster grid that match the department defined by my trigger and then put all of these contacts into one single cell on my project tracking grid. So far, I've been able to get the array and then extract the emails I would need but there's a couple issues:

1) There are duplicates in the array that is causing the array to be larger than 20 contacts which the contact field cannot handle more than. Is there a way to remove duplicates and retain the unique/distinct values?

2) I tried to Trim Array before Extract Field From Array but my output from the Extract is now empty. Why is this? I've updated my Array field.

I'm new to Bridge and JSON so any tips are much appreciated. Thanks!


Tags:

Answers

  • Samuel Mueller
    Samuel Mueller Overachievers
    Options

    The easiest way in my opinion to remove duplicates would be to use the javascript module, and write a short script to do this.

    The trim module just removes the bottom however many number or array items you specify, doesn't look at duplicates.

    ChatGPT is a great resource for quick javascript code.

    also, multiple select contact has to be in a specific json format, so you may run into that as well.

  • Samuel Mueller
    Samuel Mueller Overachievers
    Options

    @Genevieve P. I've never actually had success with this, do you know if it's even possible to update a multi select contact column with the standard Smartsheet update modules in bridge? I've always had to use an api call to make it work.

  • Genevieve P.
    Genevieve P. Employee Admin
    Options

    Thanks for the tag, @Samuel Mueller!

    I have to admit I'm not sure if it's possible...there was a similar question that I answered without testing 🤔:


  • bsanson
    bsanson
    edited 04/18/24
    Options

    @Samuel Mueller Thanks for the response! I was trying the Trim module just to see if I could get multiple contacts to post to the row. I was able to find a department that provided less than 20 results in the array so I didn't need the Trim to test this. Unfortunately, it was unable to update row due to the format as you mentioned.


  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭
    Options

    @bsanson @Samuel Mueller @Genevieve P.

    hey. I've done the opposite and parsed multiselect contacts into individual rows, using Bridge - but I have never been successful in doing anything with a multiselect contact and have it remain a smartsheet contact. 😒

    You might be able to get past the error by overriding validation on the column (Advanced Options)

    Kelly

  • Samuel Mueller
    Samuel Mueller Overachievers
    Options

    so @bsanson it sounds like you will likely need the JavaScript module to create a unique array in the proper [{"name":"name", "email":"email.com"}] format, and then use the Call API module to update these cells. I did try a bunch of different options the other day using the built in update row module and also fell short again.

    If you need an example on the JavaScript, and API call, I may be able to dig one up