# Sequence Number such as (1,2,3) Program Rule

**URL:** <https://community.dhis2.org/t/sequence-number-such-as-1-2-3-program-rule/48910>\
**Category:** Support - Assistance technique\
**Created:** [4 August 2022 07:32 UTC](https://community.dhis2.org/t/sequence-number-such-as-1-2-3-program-rule/48910 "2022-08-04T07:32:11Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Gassim](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/gassim/32/35347_2.png) [@Gassim](https://community.dhis2.org/u/Gassim)\
**Post date:** [8 August 2022 13:11 UTC](https://community.dhis2.org/t/sequence-number-such-as-1-2-3-program-rule/48910/4 "2022-08-08T13:11:06Z")

</div>

You’re welcome! Thank you! 🙂 Would you please describe the use case further because it might help with finding a solution?

There is an option to use autogenerated values based on a [TextPattern](https://docs.dhis2.org/en/use/user-guides/dhis-core-version-master/additional-information/dhis2-tutorials.html#working-with-textpattern) which has a function called SEQUENTIAL(); however, these autogenerated values are for Tracked Entity Attributes in a Tracker program. You are asking about a program rule so I believe you are using a tracker program so instead of using a data element you could use a tracked entity attribute. (In a TEA select ‘unique’ and an option will appear ‘automatically generated values’)

However, the sequence is not exactly strict about the order of which value was inserted. To understand this better have a look at this explanation: [Question regarding Expiry of reserved IDs of an auto-generated unique values configured with a text pattern containing CURRENT\_DATE(MM-yyyy):](https://community.dhis2.org/t/question-regarding-expiry-of-reserved-ids-of-an-auto-generated-unique-values-configured-with-a-text-pattern-containing-current-date-mm-yyyy/40761)

---

_[View the full topic](https://community.dhis2.org/t/sequence-number-such-as-1-2-3-program-rule/48910)._
