HI,
Im trying to clear a text field based on cascading's child option (if it is none). I tried using count (List) if is it less than 2, empty it. I tried getting the empty value using (?). And even getting the string value (.contains) but to no avail.
Here's what I have
def investmentClass = getFieldById("customfield_69820")
def requestClassification = getFieldById("customfield_69311")
Map selectedOptions = requestClassification.getValue() as Map
def parentOption = selectedOptions.get(0).toString()
def childOption = selectedOptions.get(1).toString()
//def cfAValue = requestClassification.value as List ///tried to count the numbers options //if (cfAValue.size < 2) {entered
//if (!childOption){ ///tried if option is empyt/null
//if (childOption.contains("bank") || childOption.contains("Bank")) { ///checked if option has value
if (childOption == null ) {
investmentClass.setFormValue('')
} else {
investmentClass.setFormValue(childOption)
}
How can i achieve this?