# recordnumber in foundset

**URL:** <https://forum.servoy.com/t/recordnumber-in-foundset/6562>\
**Category:** Classic Servoy\
**Created:** [October 10, 2006, 8:22am UTC](https://forum.servoy.com/t/recordnumber-in-foundset/6562 "2006-10-10T08:22:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![tgs](https://avatars.discourse-cdn.com/v4/letter/t/f19dbf/32.png) [@tgs](https://forum.servoy.com/u/tgs)\
**Post date:** [October 10, 2006, 8:22am UTC](https://forum.servoy.com/t/recordnumber-in-foundset/6562/1 "2006-10-10T08:22:25Z")

</div>

how can i get the recordnumber (1, 2, 3,…) in a list of the foundset easier as in a loop methode? i need this for example in an order-form with order-items.

thank you for help  
thomas

---

<div class="post-metadata">

**Author:** ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)\
**Post date:** [October 13, 2006, 1:14pm UTC](https://forum.servoy.com/t/recordnumber-in-foundset/6562/2 "2006-10-13T13:14:21Z")

</div>

Hi Thomas, can you be more specific?

Why doesn’t the foundset.getRecord(index) or controller.setSelectedIndex(index) work for you?

---

<div class="post-metadata">

**Author:** ![tgs](https://avatars.discourse-cdn.com/v4/letter/t/f19dbf/32.png) [@tgs](https://forum.servoy.com/u/tgs)\
**Post date:** [October 13, 2006, 3:40pm UTC](https://forum.servoy.com/t/recordnumber-in-foundset/6562/3 "2006-10-13T15:40:17Z")

</div>

example:  
i have an invoice with may be five related items (records in tabel positions) and i need the number of each related item. 1 for the first, 2 for the second and so on. i could not create this with a calculation.

regards  
thomas

---

<div class="post-metadata">

**Author:** ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)\
**Post date:** [October 13, 2006, 3:44pm UTC](https://forum.servoy.com/t/recordnumber-in-foundset/6562/4 "2006-10-13T15:44:20Z")

</div>

I THINK I understand now. I would, in such a case, create a sequence number upon adding an item to the invoice. In that case you have your number…

Does that help?

---

<div class="post-metadata">

**Author:** ![tgs](https://avatars.discourse-cdn.com/v4/letter/t/f19dbf/32.png) [@tgs](https://forum.servoy.com/u/tgs)\
**Post date:** [October 13, 2006, 3:47pm UTC](https://forum.servoy.com/t/recordnumber-in-foundset/6562/5 "2006-10-13T15:47:15Z")

</div>

thank you… i will try this and post my result!

---

<div class="post-metadata">

**Author:** ![tgs](https://avatars.discourse-cdn.com/v4/letter/t/f19dbf/32.png) [@tgs](https://forum.servoy.com/u/tgs)\
**Post date:** [October 13, 2006, 3:50pm UTC](https://forum.servoy.com/t/recordnumber-in-foundset/6562/6 "2006-10-13T15:50:38Z")

</div>

… but if you delete the 3rd item of five, you will have a sequence like 1, 2, 4, 5, or?

---

<div class="post-metadata">

**Author:** ![Harry\_Catharell](https://avatars.discourse-cdn.com/v4/letter/h/e19adc/32.png) [@Harry\_Catharell](https://forum.servoy.com/u/Harry_Catharell)\
**Post date:** [October 13, 2006, 4:20pm UTC](https://forum.servoy.com/t/recordnumber-in-foundset/6562/7 "2006-10-13T16:20:14Z")

</div>

Hi Thomas,

Try adding a label to the item form and set the text to be ‘currentRecordIndex’ from the standard tags

This will show you the 1,2,3,4,5 visually and will also reorient itself if you delete item 3 to show only 1,2,3,4

Does this help or is there some other purpose that you need to numbers for

Cheers  
Harry

---

<div class="post-metadata">

**Author:** ![tgs](https://avatars.discourse-cdn.com/v4/letter/t/f19dbf/32.png) [@tgs](https://forum.servoy.com/u/tgs)\
**Post date:** [October 13, 2006, 4:29pm UTC](https://forum.servoy.com/t/recordnumber-in-foundset/6562/8 "2006-10-13T16:29:14Z")

</div>

the problem was, i don’t have ‘currentRecordIndex’ in my list of standard tags! but i added now a label and set the text in the property editor like %%currentRecordIndex%% and how wonder… it works!  
thank you marcel, this is a big hint!

---

<div class="post-metadata">

**Author:** ![tgs](https://avatars.discourse-cdn.com/v4/letter/t/f19dbf/32.png) [@tgs](https://forum.servoy.com/u/tgs)\
**Post date:** [October 13, 2006, 4:31pm UTC](https://forum.servoy.com/t/recordnumber-in-foundset/6562/9 "2006-10-13T16:31:18Z")

</div>

sorry… thank you harry!
