Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to remove selections on a multiselect field with Adatavist Behaviors

Say I have a multi-select field for which I am using Adaptavist Scriptwriter behaviors to select the value of the said multi-select field (based on the value of other fields).

Since it is a multi-select field, every time I call .setFormValue() it appears to appends to a list of selected values.

eg: 

multiselectfield.setFormValue("Value 1")
multiselectfield.setFormValue("Value 2")
multiselectfield.setFormValue("Value 3")

if then overlay the value of multiselectfield you get ["Value 1", "Value 2", "Value 3"]

is there a way to specify in .setFormValue that you dont want to append to the values list, but instead you want to replace the previous value?

I've tried 
multiselectfield.setFormValue("Value 1")
multiselectfield.setFormValue(null)
multiselectfield.setFormValue("Value 2")
multiselectfield.setFormValue(null)
multiselectfield.setFormValue("Value 3")

but assigning null doesnt seem to really clear the previously selected valued for the field.

Or may be a way to specifically assign a value to the first position of the value list?

say something like multiselectfield.setFormValue[0]("Value 2")

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you