My speed if/then statement not working

Yvette_s_Channe

28-02-2018

Hi,

I have a table:

1430062_pastedImage_3.png

I currently have the following script in "change"

if (Biker > Sales) {

this.rawValue = Accept;

}

else

this.rawValue == Reject ;

}

Thank you in advance for any help.

Accepted Solutions (0)

Answers (6)

Answers (6)

mouslander

04-03-2018

Try this:

if (Biker.rawValue >= Sales.rawValue) { //this assumes that your field name is Biker and Sales

                                                              // you said greater than or equal to so us >=

this.rawValue = "Accept";                    // I assume you mean if Biker is greater than or equal to then                                                              // the customer field is to say Accept otherwise reject.

}

else

this.rawValue = "Reject" ;

}

MinusZero

04-03-2018

Are you using FormCalc or Javascript?

Javascript will need .rawValue (unless it is a variable name you have there).

Formcalc doesnt need semicolons at the end or rawValue.