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 key selections off of check boxes using behaviors including multi-select issues

I am trying to create a check list that if the user selects an option other fields appear.

example: checklist A,B,C

if A then show option 1

if B then show option 2

if C then show option 3

so if A and B are checked then I want to see 1 and 2 and so on.

 

Currently my code only shows if one is checked:

def 1Field = getFieldByName("Option 1")
def 2Field = getFieldByName("Option 2")
def 3Field = getFieldByName("Option 3")
def checklistField = getFieldById(getFieldChanged())

if (checklistField.getValue()=="A") {
1Field.setHidden(false)
1Field.setRequired(true)
}
else if (checklistField.getValue()=="B") {
2Field.setHidden(false)
2Field.setRequired(true)
}
else if (checklistField.getValue()=="C") {
3Field.setHidden(false)
3Field.setRequired(true)
}
else {
1Field.setHidden(true)
1Field.setRequired(false)
2Field.setHidden(true)
2Field.setRequired(false)
3Field.setHidden(true)
3Field.setRequired(false)
}

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Apps & Integrations

🍻🍂Apptoberfest Update: Upcoming Virtual Events 🎉

Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...

151 views 2 13
Read article

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