Skip to main content
Known Participant
March 30, 2016
Answered

if Text

  • March 30, 2016
  • 2 replies
  • 704 views

I have Text1 Text2 Text3 and Text4

if Text1 has the values 1-7 (comb of 1 character) and Text2 the values 01-98 (comb of 2 characters) then we will go to Text3

if Text1 has the values 0 (comb of 1 character) and Text2 the values 00 (comb of 2 characters) then we will go to Text4

help

Thanks

This topic has been closed for replies.
Correct answer try67

I'll give you an example for the script you should use for Text1 and you can extrapolate from that for the rest of the fields:

var t2 = Number(this.getField("Text2").value);

if (event.value>=1 && event.value<=7 && t2>=1 && t2<=98) this.getField("Text3").setFocus();

2 replies

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
March 30, 2016

I'll give you an example for the script you should use for Text1 and you can extrapolate from that for the rest of the fields:

var t2 = Number(this.getField("Text2").value);

if (event.value>=1 && event.value<=7 && t2>=1 && t2<=98) this.getField("Text3").setFocus();

try67
Community Expert
Community Expert
March 30, 2016

You can easily adjust the example I gave in your other thread (if) to achieve that...

klothosAuthor
Known Participant
March 30, 2016

the problem is that i want Text1 and Text2 have values together,not only one of them .For example Text1=5 and Text2=09 or Text1=0 and Text2=00

klothosAuthor
Known Participant
March 30, 2016

both