Hi, This is my requirement. When I select custom field Select list I would like to show or hide other customfields(SelectList, and Text).
I have Single Select Custom Fields "Services" with Values A,B,C,D. If A is selected, I would like to show Select List customfield and Text Field. If B is selected, I would like to show different set of select List CF and Text Field.
I tried the Behaviour script and it is not working.
def ServiceRequest = getFieldById ("customFieldId_10905")
def Consultation = getFieldById ("customFieldId_10911")
def pulltype = ServiceRequest.getValue()
if (pulltype == "10623") {
Consultation.setHidden(true)
} else {
Consultation.setHidden(fals
You can try with following code
def cfServiceRequest = getFieldById ("customFieldId_10905")
def serviceRequest = cfServiceRequest.getValue() as String
def Consultation = getFieldById ("customFieldId_10911")
def textField = getFieldById ("customFieldId_10912") //change field id
def selectList = getFieldById ("customFieldId_10913") //change field id
def textField2 = getFieldById ("customFieldId_10914") //change field id
if (serviceRequest == "option name1") { //change option name
Consultation.setHidden(false) //display field
textField.setHidden(false) //display field
} else {
Consultation.setHidden(true) //hide field
textField.setHidden(true) //hide field
}
if (serviceRequest == "option name2"){ //change option name
selectList.setHidden(false) //display field
textField2.setHidden(false) //display field
} else {
selectList.setHidden(true) //hide field
textField2.setHidden(true) //hide field
}
I don't have time to optimize the code so you can do that !!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.