Dear All,
I?m trying to disable some fields when the field has value different 0, and enable it again when the field has value 0. I got this code but only works for the first field.
if({lunes}!= ‘0.00’)
{
sc_field_disabled(“martes=true; miercoles=true; jueves=true; viernes=true; sabado=true; domingo=true”);
}
elseif ({lunes}== ‘0.00’)
{
sc_field_disabled(“martes=false; miercoles=false; jueves=false; viernes=false; sabado=false; domingo=false”);
}
elseif ({martes}!= ‘0.00’)
{
sc_field_disabled(“lunes=true; miercoles=true; jueves=true; viernes=true; sabado=true; domingo=true”);
}
elseif ({martes}== ‘0.00’)
{
sc_field_disabled(“lunes=false; miercoles=false; jueves=false; viernes=false; sabado=false; domingo=false”);
}
elseif ({miercoles}!= ‘0.00’)
{
sc_field_disabled(“lunes=true; martes=true; jueves=true; viernes=true; sabado=true; domingo=true”);
}
elseif ({miercoles}== ‘0.00’)
{
sc_field_disabled(“lunes=false; martes=false; jueves=false; viernes=false; sabado=false; domingo=false”);
}
elseif ({jueves}!= ‘0.00’)
{
sc_field_disabled(“lunes=true; martes=true; miercoles=true; viernes=true; sabado=true; domingo=true”);
}
elseif ({jueves}== ‘0.00’)
{
sc_field_disabled(“lunes=false; martes=false; miercoles=false; viernes=false; sabado=false; domingo=false”);
}
elseif ({viernes}!= ‘0.00’)
{
sc_field_disabled(“lunes=true; martes=true; miercoles=true; jueves=true; sabado=true; domingo=true”);
}
elseif ({viernes}== ‘0.00’)
{
sc_field_disabled(“lunes=false; martes=false; miercoles=false; jueves=false; sabado=false; domingo=false”);
}
elseif ({sabado}!= ‘0.00’)
{
sc_field_disabled(“lunes=true; martes=true; miercoles=true; jueves=true; viernes=true; domingo=true”);
}
elseif ({sabado}== ‘0.00’)
{
sc_field_disabled(“lunes=false; martes=false; miercoles=false; jueves=false; viernes=false; domingo=false”);
}
elseif ({domingo}!= ‘0.00’)
{
sc_field_disabled(“lunes=true; martes=true; miercoles=true; jueves=true; viernes=true; sabado=true”);
}
elseif ({domingo}== ‘0.00’)
{
sc_field_disabled(“lunes=false; martes=false; miercoles=false; jueves=false; viernes=false; sabado=false”);
}
When I probe the first IF it works but the others doesn?t work.
If anybody can help me I?d apreciate it.
Thanks in advance for your help.