IF sentences issues

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.

Shouldn’t



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");
}

be



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");
}

if ({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");
}

??

(all is done with elseif, even the new vars? perhaps correct, but doesn’t sounds logical to me)

I now see that this post has been done three times. Please don’t do that.

Ok sorry, the fields are {lunes}, {martes}, {miercoles}.{jueves},{viernes},{sabado} and {domingo}, I?m trying to do when {lunes} has a value different 0 disable the other fields and when it has 0 value enable the fields, and do the same process with the other fields

Never go more than Lunes because it’s impossible to continue

Elseif works if.previous condition is.false,but.you never.will pass from lunes!=0 or lunes==0 because always one of both conditions is.true.

I hope.I explained correctly