Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

My speed if/then statement not working

Avatar

Level 2

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.

6 Replies

Avatar

Level 7

Are "Acceopt" and "Reject" variable names or string values?

If string values, you need to place quotation marks around the words.

Avatar

Level 7

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.

Avatar

Level 7

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

}