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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.