I want to change the value of a drop down field on the screen when another field has been changed. Why does this not work?
def selectListConsent = getFieldById(getFieldChanged())
selectListConsent.clearError()
String selectListConsentValue = selectListConsent.getValue()
def requiredValue = (selectListConsentValue == "ValueXXX")
def cfImpact = getFieldByName("All Meters Impacted")
if (requiredValue == true){
cfImpact.setFormValue("ValueZZZ")
}
Hi @Rob B
You will need to find where the issue is.
def selectListConsent = getFieldById(getFieldChanged())
selectListConsent.setDescription("Select List Consent")
String selectListConsentValue = selectListConsent.getValue()
def cfImpact = getFieldByName("All Meters Impacted")
cfImpact.setDescription("Impact Field")
if (selectListConsentValue == "ValueXXX"){
cfImpact.setFormValue("ValueZZZ")
cfImpact.setDescription("Impact Field passed condition")
}
If you see the description "Select List Consent" under the field means that you get the proper field.
If you see the description "Impact Field" under the field means that you get the proper field.
If you see the description "Impact Field passed condition" under the field means that you get the proper field and the condition is true.,
Regards
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.