Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to get a field to be hidden or not hidden depending on the selection of a Multi Select List

Aaron Andrade
Contributor
December 16, 2021

**Already asked this question for a Single Select List, that I got to work, but found out we can't change it to a single select and need to make it work for a Multi Select List**

We are trying to make it where a field is hidden on a screen unless one of the two highlighted choices are picked:

image.png

Here is the code that I got to work for the Single Select List in the behaviour Is there anything I can do to make it work for the Multi Select List?:

def apc = getFieldByName("Analysis Provided to Client")
def severity = getFieldById(getFieldChanged())

def selectedOption = severity.getValue() as String

if (severity.getValue() == "No Impact/Task") {
apc.setHidden(true)
}else if(severity.getValue() == "4 - Affects non-critical function (low impact)") {
apc.setHidden(true)
} else if(severity.getValue() == "3 - Affects non-critical function (high impact)") {
apc.setHidden(true)
}else if(severity.getValue() == "N/A"){
apc.setHidden(true)
}else {
apc.setHidden (false)
}

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events