Advance text field components in flex reapeater

I have a flex repeater contains multiple repeated rows, each row has 2 text field components. I would like to have script automatically advance the focus to the next text field once its current value filled… this will continue down to all rows.
I have tried enable domId for each text field with prefix of each row with Step# (Step1_txt1, Step1_txt2) and using text Value Change script:
I looked through the forum but haven’t found the solutions yet. Best match was: Please add ids to perspective components for writing tests

What would be the best way to make this approach? Thanks everyone!

Does pressing tab not work?

you arent going to get anything done with the driver thing, that is not running on the client. but just on the gateway, used for testing

No keyboard involved but text is entered using scanner.

You can probaly program you scanner to send a tab after a scan

If the scanner is used for somethign else where this would be undesirable

The easiest way is proably working with messages.

  1. A scripts in the onChange of the inputfield, that sends its step number/id in a message to the page
  2. In the page a message handler that sends a message to the next step
  3. a message handler on the inputfield that does a focus if its id matches the one send by the message of step 2

it can also be done with a step less if you use indexs instead of your prefex

The supplied approach will work, but will require you to bind the domId field to an incoming param of the View, which means you’ll also need to supply those params into the instances of the Flex Repeater.

Thanks everyone for your suggestions… I have successfully made it happened with message handler for the text field…

then using the Change Script option on Props Text to pass the name of the next component to get focused.

1 Like