I have a behavior running that shows/hides a field(single text) on the basis of an option - "CRO" selected in the single select field.
My requirement is that I want the field(single text) should be mandatory when "CRO" is selected in the single select field but if anything else is selected it should be optional.
How can I do it? I used behaviours again but that did not work-
def selectCFValue = getFieldByName("Requesting Segment")
def targetField = getFieldByName("Requesting Business Unit")
if (selectCFValue.getValue() == "CRO")
targetField.setRequired(true)
else
targetField.setRequired(false)
Can anyone help?