Hello,
I have been trying to set a Multi-Select field as required based on the value of another field. I can get it working for other fields, but struggling with Multi-select.
In this example, for non-multi-select: If 'Release Notes Status' = 'Include - Finalized', then 'Release Notes Title' is required. How do I tweak it for multi-select fields?
If you want to do this for a Multi-Select field, your if condition try something like this:-
def ReleaseNotesStatus = getFieldById(fieldChanged)
def releasetNotesStatusValue = ReleaseNotesStatus.value
def additionalInfo = getFieldByName('Release Notes Title')
def additionalInfoValue = additionalInfo.value
additionalInfo.clearError()
if (releasetNotesStatusValue = ['Option1', 'Option2', Option3'] && !additionalInfoValue ) {
additionalInfo.setError("Sample Error Message")
}
Hope this helps to solve your question. :-)
I am looking forward to your feedback.
Thank you and Kind regards,
Ram
Has your question been answered?
If yes, please accept the answer.
Thank you and Kind regards,
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Ram Kumar Aravindakshan _Adaptavist_
I will mark this as accepted, as the script works. However, it is a bit buggy. Sometimes the field will be marked as required, sometimes it doesn't.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.