# Auto tab

**URL:** <https://forum.inductiveautomation.com/t/auto-tab/5483>\
**Category:** Ignition\
**Created:** [November 27, 2012, 8:34pm UTC](https://forum.inductiveautomation.com/t/auto-tab/5483 "2012-11-27T20:34:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kml](https://avatars.discourse-cdn.com/v4/letter/k/c89c15/32.png) [@kml](https://forum.inductiveautomation.com/u/kml)\
**Post date:** [November 27, 2012, 8:34pm UTC](https://forum.inductiveautomation.com/t/auto-tab/5483/1 "2012-11-27T20:34:01Z")

</div>

I have a 18 numeric text fields that i need to auto tab from 1-18 based on an input from a field device.  
Once all fields are done a save button is pressed and fields are reset and want to start over at field 1.

I remember doing something like this in the past but can’t seam to get my memory working

---

<div class="post-metadata">

**Author:** ![James.Lorenz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/james.lorenz/32/3290_2.png) [@James.Lorenz](https://forum.inductiveautomation.com/u/James.Lorenz)\
**Post date:** [November 27, 2012, 9:11pm UTC](https://forum.inductiveautomation.com/t/auto-tab/5483/2 "2012-11-27T21:11:13Z")

</div>

Is the value from the device being stored in a SQLTag? If so, you can use a client tag change script that will execute when the tag changes, and have a set of conditionals that calls requestFocusInWindow() for the appropriate component.

For clearing the values, you can iterate over all components using getComponents(), but if you have other component types on the window, you will have to sort out the NumericTextFields by using a conditional that tests to see if component.getClass() contains “PMINumericTextField”. You can also assign a proper naming convention to all of the numeric text fields, such as “Numeric Text Field 1”, “Numeric Text Field 2”, … , “Numeric Text Field 18” so that it is easier to iterate through them.

---

<div class="post-metadata">

**Author:** ![kml](https://avatars.discourse-cdn.com/v4/letter/k/c89c15/32.png) [@kml](https://forum.inductiveautomation.com/u/kml)\
**Post date:** [November 28, 2012, 4:59pm UTC](https://forum.inductiveautomation.com/t/auto-tab/5483/3 "2012-11-28T16:59:54Z")

</div>

Is there any more info on requestFocusInWindow() other than what is in the user manual?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 28, 2012, 5:04pm UTC](https://forum.inductiveautomation.com/t/auto-tab/5483/4 "2012-11-28T17:04:21Z")

</div>

[docs.oracle.com/javase/6/docs/ap … sInWindow(](http://docs.oracle.com/javase/6/docs/api/java/awt/Component.html#requestFocusInWindow())

It’s one of many, many, functions available as part of the Java / Swing API that lies underneath.
