Skip to main content

Update Multiple Select Field Values in a record

  • May 27, 2021
  • 2 replies
  • 19 views

Hi

I’m trying to build a script that updates a multiple select field from one option “option1 / option2 / option3” into multiple options after I map through the string to make each word an individual option.

Example

Before:

 option a : "option1 / option2 / option3"

After:

  option A: option1
  option B: option2
  option C: option3

Any ideas on how this could be done?

2 replies

Kamille_Parks11
Forum|alt.badge.img+27

Add this to your script to make separate the combined select value

let initial = something \\ should be a string that follows the format "option1 / option2 / option3"
let separated = initial.split(" / ").map(option => (return {name: option}))

Then you can update the record like normal using the separated value for the multiple select field.


  • New Participant
  • 4 replies
  • January 2, 2022

Add this to your script to make separate the combined select value

let initial = something \\ should be a string that follows the format "option1 / option2 / option3"
let separated = initial.split(" / ").map(option => (return {name: option}))

Then you can update the record like normal using the separated value for the multiple select field.


can you explain this for a newbie? with an example of the script and where to put it?