Hi,
I'm using Behaviour plugin with this script associated to the customfield I want to hide:
FormField ci = getFieldByName("CI afectado")
if(ci.getValue() == ""){
getFieldByName("Proyecto de gestión (PdG)").setHidden(false);
}
if(ci.getValue() != ""){
getFieldByName("Proyecto de gestión (PdG)").setHidden(true);
}
In this case, the customfield "Proyecto de gestión (PdG)" is allways hidden.....
But...... if I use the next code:
FormField ci = getFieldByName("CI afectado")
if(ci.getValue() == null){
getFieldByName("Proyecto de gestión (PdG)").setHidden(false);
}
if(ci.getValue() != null){
getFieldByName("Proyecto de gestión (PdG)").setHidden(true);
}
In this other case, the customfield "Proyecto de gestión (PdG)" is allways shown.....
Where is my mistake?
Regards
Begoña
It looks like ci.getValue() returns null always.
That explains that both ci.getValue() != "" and ci.getValue() == null are evaluated to true.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.