Form field with multiple if statements
Good afternoon all , im wondering if i could get some help with a script .
I have 5 columns PayRate(a), HoursPerWeek(b), WeeksPerYear(c), MonthsPerYear(d), and Annual Income.
Annual income is my calculaetd field .
What im trying to accomplish is :
if b>0 then a*b
if c>0 then a*c
if d>0 then a*d
if a=" " then " "

This is what i have so far:
var a = Number(this.getField("PayRate").valueAsString);
var b = Number(this.getField("HoursPerWeek").valueAsString);
var c = Number(this.getField("WeeksPerYear").valueAsString);
var d = Number(this.getField("MonthsPerYear").valueAsString);
if (b=>0)
{event.value = a*b ;}
else if (c=>0)
{event.value = a*c ;}
else if (d=>0)
{event.value = a*d ;}
