# List of used UDT in an provider

**URL:** <https://forum.inductiveautomation.com/t/list-of-used-udt-in-an-provider/44714>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [March 20, 2021, 11:15am UTC](https://forum.inductiveautomation.com/t/list-of-used-udt-in-an-provider/44714 "2021-03-20T11:15:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stra](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/stra/32/23678_2.png) [@stra](https://forum.inductiveautomation.com/u/stra)\
**Post date:** [March 20, 2021, 11:15am UTC](https://forum.inductiveautomation.com/t/list-of-used-udt-in-an-provider/44714/1 "2021-03-20T11:15:13Z")

</div>

I’m looking for an elegant way to have a list of the used UDT in a provider

my solution work but use a lot of interaction to find the result; same idee

```auto
results = system.tag.browse(provider, {"tagType": "UdtInstance", "recursive": True}
).results
myUdtList = []
for item in results:
	if item['typeId'] not in myUdtList:
		myUdtList.append(item['typeId'])

```

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 20, 2021, 4:35pm UTC](https://forum.inductiveautomation.com/t/list-of-used-udt-in-an-provider/44714/2 "2021-03-20T16:35:58Z")

</div>

I don’t see how you would get around browsing for the instances you wish. However, this is a task that should not be run every time you need the information. You should run it as a script module initialization background task, and cache the results in a script module top-level variable (dictionaries work well for such). Possibly perform a re-browse regularly. Possibly do the browse in the gateway and _publish_ the results in a dataset or document memory tag.
