Hi Team,
In my Project I have a Multi Select Custom Field in that we have some Options so Here I'm performing Depends upon the Option Selected in the Multi List Field Another Custom Field has to appear or else those fields has to Hide.
// customfield_10001 is Single Select
// Customfield_10002 is Single Select
if(getFieldById("customfield_10001").getValue().equals("Other")){
getFieldById("customfield_10002").setHidden(false)
getFieldById("customfield_10002").setRequired(true)
}else{
getFieldById("customfield_10002").setFormValue(null)
getFieldById("customfield_10002").setRequired(false)
getFieldById("customfield_10002").setHidden(true)
}
This above Script is worked for the Single Select Custom Field but its not Working for the "Multi Select " Custom Field
Can any One Suggest me Why its not working for Multi Select and can you please suggest me how to make it work for Multi Select List Custom Field
or Is there any chance that to Convert the "Mult-select List" field to "Single-Select Field"
Thanks,
Kumar
It's the content that is the problem. When you ask for the content of a single-select field, you get "empty" or the selected option. When you ask for the content of a multi-select, you get "empty" or an array of one or many options - i.e. those selected.
Your code needs to take the returned "value" and iterate through it looking for the option(s) you want to detect.
But... I think (but have not tried in this context)... changing your ".equals" to ".contains" might be enough.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Want to make your everyday Community actions directly contribute to reforestation? The Atlassian Community can achieve this goal by liking a post, attending an ACE, sending your peers kudos, and so much more!
Help us plant more trees
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.