Hi all
I tried to write my code in initialiser and found that I couldn't get the value of the single field. If I used the "getFieldchanged ()" method in fileds, this would be fine. I can get the radio field value normally.
But I need to determine the value of the two radio fields, so I can't reference another field in fileds and get the corresponding value.
Here's my code
def filed = getFieldById('customfield_14801')
def filed1 = getFieldById('customfield_14802')
def filed2 = getFieldById('customfield_14803') // this is a text filed
def value = filed.getValue()
def value1 = filed1.getValue()
if (value == 'other' && value1 == 'other' ){
filed2.setRequired(true)
}
I try to determine if the field has a value, and whatever option my radio field selects returns null
def text = """ $value """
filed2.setHelpText(text)