Here is my script but it gives error ;
def Welches System = getFieldById("customfield_25108")
def Welcher Service/Betroffene Kachel = getFieldById("customfield_25203")
if(Welches System.getValue()){
def selectedOption = Welches System.getValue() as String
if(selectedOption == "MKH"){
Welcher Service/Betroffene Kachel.setHidden(true)
Welcher Service/Betroffene Kachel.setRequired(false)
}else{
Welcher Service/Betroffene Kachel.setHidden(false)
Welcher Service/Betroffene Kachel.setRequired(true)
}
}
what I am wanting if the customfield_25108 is as a value select "MKH" then my other cascade type customfield_25203 hidden(true) and requied(false)
the other options for my customfield_25108 ;
"None"
"NKH"
When selected value as "NKH" then customfield_25203 required(true)
Hi @Cem Tuğrul , thanks for your question.
I've tested the script in a similar manner in my instance and it's working. Are you sure you've added the script to the correct field in the behavior?
For example, as I indicated in the screenshot, since my variable field is "assetCF", I selected it from the field section and added the script to it. Please double-check, and if the issue persists, could you please provide more information?
Best,
Murat Seven
Hi Murat,
I have changed as below then it is working now. (Çok saol Hocam)
def WelchesSystem = getFieldById("customfield_25108")
def WelcherServiceBetroffeneKachel = getFieldById("customfield_25203")
if(WelchesSystem.getValue()){
def selectedOption = WelchesSystem.getValue() as String
if(selectedOption == "MKH"){
WelcherServiceBetroffeneKachel.setHidden(true)
WelcherServiceBetroffeneKachel.setRequired(false)
}else{
WelcherServiceBetroffeneKachel.setHidden(false)
WelcherServiceBetroffeneKachel.setRequired(true)
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.