Ajax event

Hi
I’d like to know how to add conditions in an ajax event
I know that when I use &&, I can put 2 arguments but I need to do it with 4
I’ve written this, but doesn’t work:

if
({Age} == 6) && ({Sex} ==1) && ({Range} < 1) && ({Range} > 3) {
{Final_range}= (10);
}

​Could you help me? Thanks

There must be one bracket to group the whole if clause, like this:
if(({Age} == 6) && ({Sex} ==1) && ({Range} < 1) && ({Range} > 3)){

or this:
if({Age}==6 && {Sex}==1 && {Range}<1 && {Range}>3){

Hi, I’ve tried but doesn’t work

Any idea?
Thanks

Both code is syntatically correct.

What exactly is not working?
What do you expect to happen? And what is happening?

Hi
Field called Final_range should set ‘10’ on change but nothing happens

Probably one or more condition in the if clause is not validating as true…

Now I see…

There is a mistake in your if clause. This part will never be true:

{Range} < 1 && {Range} > 3

because if {Range} is <1, then it will never be >3
and if {Range} is >3, then it will never be <1…

What did you mean in this condition?

Hi, sorry
I meant >1 and

Meant >1 and

&& {Range}>1 && {Range}<3

Hi, I’ve tried this and doesn’t work
It only works when there are maximum 2 conditions, if I add 3 or four not
How can I do?
Field SLB_n should b 10 on change

if
(({Edad} == 6) && ({Sexo} == 1) && ({SLB} < 5)) {
{SLB_n}= (10);
}

Tiene que tener en cuenta el tipo de dato que tiene el campo. Todos son de tipo numerico?
La asignacion: {SLB_n}= (10); debe ser: {SLB_n}= 10;

Muchas gracias