# Sort Template Repeater

**URL:** <https://forum.inductiveautomation.com/t/sort-template-repeater/25172>\
**Category:** Ignition\
**Tags:** ignition78\
**Created:** [May 20, 2019, 8:48pm UTC](https://forum.inductiveautomation.com/t/sort-template-repeater/25172 "2019-05-20T20:48:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcgheeiv](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@mcgheeiv](https://forum.inductiveautomation.com/u/mcgheeiv)\
**Post date:** [May 20, 2019, 8:48pm UTC](https://forum.inductiveautomation.com/t/sort-template-repeater/25172/1 "2019-05-20T20:48:01Z")

</div>

Ignition 7.8.3 (yes I know the client needs to upgrade)…

Is there anyway to sort the templates in a template repeater by a value (date) shown on the template?

Client has 100 pieces of identical equipment. 100 instances of a UDT are used to get information from the equipment. A template repeater is used to show templates bound to these UDTs. We need to be able to sort what is shown by a date stored in the UDT.

Thanks

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [May 20, 2019, 8:58pm UTC](https://forum.inductiveautomation.com/t/sort-template-repeater/25172/2 "2019-05-20T20:58:37Z")

</div>

Once they’re in the repeater there is no property which allows for sorting. You should sort the Template Parameters you are supplying before they’re applied - in your SQL query, or as a last-ditch effort you could apply a propertyChange script which sorts the data (small datasets only).

If you’re reading from hundreds of UDTs, you might want to use a Gateway timer script to regularly construct a tag which builds itself from the referenced UDTs and then sorts by date. Then you could bind the Template Repeater’s Template Parameters property to this new Tag.
