# Display sample number as unique sample ID

**URL:** <https://forum.getodk.org/t/display-sample-number-as-unique-sample-id/34046>\
**Category:** Support\
**Tags:** odk-xlsform\
**Created:** [June 21, 2021, 9:22pm UTC](https://forum.getodk.org/t/display-sample-number-as-unique-sample-id/34046 "2021-06-21T21:22:24Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![danbjoseph](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/danbjoseph/32/21901_2.png) [@danbjoseph](https://forum.getodk.org/u/danbjoseph)\
**Post date:** [June 23, 2021, 4:10pm UTC](https://forum.getodk.org/t/display-sample-number-as-unique-sample-id/34046/4 "2021-06-23T16:10:36Z")

</div>

Welcome to the ODK forum, @mdschuster! We're glad you're here. When you get a chance, please [introduce yourself on this forum thread](https://forum.getodk.org/t/-/6671). I'd also encourage you to add an image as your avatar because it helps build community!

You can get the index value of a repeat group in order to build sample numbers. Please see the following:

- [Indexed-repeat used in a repeat nested in a repeat returns wrong value - #47 by LN](https://forum.getodk.org/t/indexed-repeat-used-in-a-repeat-nested-in-a-repeat-returns-wrong-value/17748/47) (forum thread)
- [Form Operators and Functions: Position](https://docs.getodk.org/form-operators-functions/#position) (docs)
- [XPath paths for repeats](https://docs.getodk.org/form-logic/#xpath-paths-for-repeats) (docs)
- [Referencing repeated questions from inside the repeat](https://docs.getodk.org/form-repeats/#referencing-repeated-questions-from-inside-the-repeat) (docs)

---

_[View the full topic](https://forum.getodk.org/t/display-sample-number-as-unique-sample-id/34046)._
