Skip to main content
Known Participant
January 9, 2021
Answered

acivate script

  • January 9, 2021
  • 1 reply
  • 801 views

Is it possible for script to activate while entering value?

This topic has been closed for replies.
Correct answer try67

Try this:

if(AFMergeChange(event).length == 6) this.getField("text1").setFocus();

The code will most likely disappear when you enter it, but it should still work.

1 reply

try67
Community Expert
Community Expert
January 9, 2021

Yes, using the Keystroke event.

MarietaaAuthor
Known Participant
January 9, 2021

So if i want to write 6 digits number in field and then set focus to next field whitout tab or exiting field how would I set it with keystroke event? I have this code but obviously it doesn't work.

if(event.value.lenght == 6)
this.getField("text1").setFocus();

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
January 9, 2021

Try this:

if(AFMergeChange(event).length == 6) this.getField("text1").setFocus();

The code will most likely disappear when you enter it, but it should still work.