# tabbing through a list of records?

**URL:** <https://forum.servoy.com/t/tabbing-through-a-list-of-records/6016>\
**Category:** Classic Servoy\
**Created:** [May 31, 2006, 7:54pm UTC](https://forum.servoy.com/t/tabbing-through-a-list-of-records/6016 "2006-05-31T19:54:27Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![amason](https://avatars.discourse-cdn.com/v4/letter/a/5e9695/32.png) [@amason](https://forum.servoy.com/u/amason)\
**Post date:** [May 31, 2006, 7:54pm UTC](https://forum.servoy.com/t/tabbing-through-a-list-of-records/6016/1 "2006-05-31T19:54:27Z")

</div>

Hi,  
I have a list that displays one field per record, and I’d like the user to be able to tab downward through the list (and shift+tab upward).

I’ve created the following simple onFocusLost script for going down:

```auto
	if(controller.getSelectedIndex() !=controller.getMaxRecordIndex());
	{
		controller.setSelectedIndex(controller.getSelectedIndex()+1);
		elements.fld_value.requestFocus();
	}

```

Where fld\_value is the name of the field pictured in the attached screenshot. This seems to work at first, and then starts looping uncontrollably through the list of records until it reaches the final record, at which points it hangs and I need to force quit.

Can someone recommend a sound method for this?

Thanks!

Andrew

---

<div class="post-metadata">

**Author:** ![amason](https://avatars.discourse-cdn.com/v4/letter/a/5e9695/32.png) [@amason](https://forum.servoy.com/u/amason)\
**Post date:** [June 1, 2006, 5:54pm UTC](https://forum.servoy.com/t/tabbing-through-a-list-of-records/6016/2 "2006-06-01T17:54:48Z")

</div>

any ideas, folks?

Thanks again,

Andrew

---

<div class="post-metadata">

**Author:** ![Westy](https://avatars.discourse-cdn.com/v4/letter/w/9de053/32.png) [@Westy](https://forum.servoy.com/u/Westy)\
**Post date:** [June 1, 2006, 6:43pm UTC](https://forum.servoy.com/t/tabbing-through-a-list-of-records/6016/3 "2006-06-01T18:43:15Z")

</div>

Which platform? On Windows you can just tell your user to use the up arrow and down arrow keys to move from record to record. I do not know about the Mac.

---

<div class="post-metadata">

**Author:** ![amason](https://avatars.discourse-cdn.com/v4/letter/a/5e9695/32.png) [@amason](https://forum.servoy.com/u/amason)\
**Post date:** [June 1, 2006, 6:51pm UTC](https://forum.servoy.com/t/tabbing-through-a-list-of-records/6016/4 "2006-06-01T18:51:12Z")

</div>

I’m on a mac… option up and down works, but I don’t think users will want to do that.

There must be a way to get this to work onFocusLost?

---

<div class="post-metadata">

**Author:** ![ngervasi](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@ngervasi](https://forum.servoy.com/u/ngervasi)\
**Post date:** [June 2, 2006, 3:05pm UTC](https://forum.servoy.com/t/tabbing-through-a-list-of-records/6016/5 "2006-06-02T15:05:43Z")

</div>

You could use a table view instead of the list view, to hide the headers just add a header part to the form.

---

<div class="post-metadata">

**Author:** ![amason](https://avatars.discourse-cdn.com/v4/letter/a/5e9695/32.png) [@amason](https://forum.servoy.com/u/amason)\
**Post date:** [June 2, 2006, 3:33pm UTC](https://forum.servoy.com/t/tabbing-through-a-list-of-records/6016/6 "2006-06-02T15:33:39Z")

</div>

Good suggestion – that will get me to the next record, but I have to hit tab 3 times to get to the correct field. It tabs to the record (highlights the nub on the left in black), then the field, name, and finally the field.

Even if I do an onRecordSelect requestFocus() on the field, after you lose focus on the field it still wants to tab through the other fields.

Any way to get around this?

---

<div class="post-metadata">

**Author:** ![ngervasi](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@ngervasi](https://forum.servoy.com/u/ngervasi)\
**Post date:** [June 2, 2006, 5:31pm UTC](https://forum.servoy.com/t/tabbing-through-a-list-of-records/6016/7 "2006-06-02T17:31:55Z")

</div>

In table view you can use UP and DOWN arrows to move between the records. No methods needed.

---

<div class="post-metadata">

**Author:** ![amason](https://avatars.discourse-cdn.com/v4/letter/a/5e9695/32.png) [@amason](https://forum.servoy.com/u/amason)\
**Post date:** [June 2, 2006, 5:35pm UTC](https://forum.servoy.com/t/tabbing-through-a-list-of-records/6016/8 "2006-06-02T17:35:12Z")

</div>

not on the mac, you can’t.

---

<div class="post-metadata">

**Author:** ![ngervasi](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@ngervasi](https://forum.servoy.com/u/ngervasi)\
**Post date:** [June 2, 2006, 5:41pm UTC](https://forum.servoy.com/t/tabbing-through-a-list-of-records/6016/9 "2006-06-02T17:41:16Z")

</div>

Yes you can, just click on a field and hit DOWN arrow, you’ll jump to the same field of the next record.

---

<div class="post-metadata">

**Author:** ![amason](https://avatars.discourse-cdn.com/v4/letter/a/5e9695/32.png) [@amason](https://forum.servoy.com/u/amason)\
**Post date:** [June 2, 2006, 5:50pm UTC](https://forum.servoy.com/t/tabbing-through-a-list-of-records/6016/10 "2006-06-02T17:50:09Z")

</div>

Ah, the problem was that I had an onFocusLost script attached to the field. Anyway to work around that…?

---

<div class="post-metadata">

**Author:** ![amason](https://avatars.discourse-cdn.com/v4/letter/a/5e9695/32.png) [@amason](https://forum.servoy.com/u/amason)\
**Post date:** [June 2, 2006, 5:51pm UTC](https://forum.servoy.com/t/tabbing-through-a-list-of-records/6016/11 "2006-06-02T17:51:49Z")

</div>

Wait – even with no onFocusLost script, the down/up arrows don’t seem to work when the form is in a tabpanel.

---

<div class="post-metadata">

**Author:** ![ngervasi](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@ngervasi](https://forum.servoy.com/u/ngervasi)\
**Post date:** [June 2, 2006, 5:55pm UTC](https://forum.servoy.com/t/tabbing-through-a-list-of-records/6016/12 "2006-06-02T17:55:02Z")

</div>

You are right, I didn’t know the form was in a tab panel. I’m getting short of hints…
