Skip to main content
Known Participant
February 2, 2018
Answered

Hello. i have varv1 and varv2.

  • February 2, 2018
  • 2 replies
  • 1856 views

Hello. i have varv1 and varv2. and i want varv2<=varv1 if not it wrong

I START LIKE THIS

// Get field values as numbers

    var v1 = +getField("Textfield66").value;

    var v2 = +getField("Textfield67").value;

how can i end it?

Thanks

This topic has been closed for replies.
Correct answer try67

maby if this will happent ,a note( v2<=v1) will apear


Add this at the end of your code:

if (v2<=v1) app.alert("Error! v2<=v1");

2 replies

Legend
February 5, 2018

Your syntax error is very clear from the message. Programmers often get this kind of error, and the solution is to carefully count brackets.

try67
Community Expert
Community Expert
February 2, 2018

What exactly do you want to happen if v2<=v1?

klothosAuthor
Known Participant
February 2, 2018

it is not allowed v2>=v1 for example if v1=100 and v2=200 this is wrong

klothosAuthor
Known Participant
February 2, 2018

maby if this will happent ,a note( v2<=v1) will apear