Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

help with if statement

Avatar

Level 7

Hi, how I can make this script to work?

Quantity, Discount and Amount are numeric fields.

if (Quantity.rawValue>=5 && Quantity.rawValue<=14);

{

Discount.rawValue=Amount.rawValue*0.05;

}

else if (Quantity.rawValue>=15 && Quantity.rawValue<=29);

{

Discount.rawValue=Amount.rawValue*0.10;

}

else if (Quantity.rawValue>=30 && Quantity.rawValue<=59)

{

Discount.rawValue=Amount.rawValue*0.15;

}

else if (Quantity.rawValue>=60 && Quantity.rawValue<=19)

{

Discount.rawValue=Amount.rawValue*0.20;

}

1 Reply

Avatar

Former Community Member

Hi,

Remove the ; at the end of first two conditions. Then things should be fine. If not, mail me the form at kvdvijaykumar@gmail.com

Thanks,

VJ