# Scripting - system.tag.configure - Create UDT

**URL:** <https://forum.inductiveautomation.com/t/scripting-system-tag-configure-create-udt/41405>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [December 10, 2020, 10:12pm UTC](https://forum.inductiveautomation.com/t/scripting-system-tag-configure-create-udt/41405 "2020-12-10T22:12:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [December 10, 2020, 10:12pm UTC](https://forum.inductiveautomation.com/t/scripting-system-tag-configure-create-udt/41405/1 "2020-12-10T22:12:15Z")

</div>

I’m on 8.1.1

I try to dynamically configure tags, I want to create a UDT…

Is there a way to do something like this ?

```auto
        if tagData == "Integer":
			tagDataType = "Int4"
		elif tagData == "Long":
			tagDataType = "Int8"
		elif tagData == "Float":
			tagDataType = "Float4"
		elif tagData == "Double":
			tagDataType = "Float8"
		else:
			tagDataType = tagData
			
		tag = {
			"name": tagName,
			"opcItemPath" : {OPCpath}.{TagName},#opc_path,
			"opcServer": {OPCserver},#opc_server,
			"dataType": tagDataType,
			"valueSource": "opc",
			"sampleMode" : "tagGroup",
			"tagGroup" : "default"
			}
	collisionPolicy = "o"
	system.tag.configure(tagPath, [tag], collisionPolicy)

```

---

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [December 12, 2020, 10:56am UTC](https://forum.inductiveautomation.com/t/scripting-system-tag-configure-create-udt/41405/2 "2020-12-12T10:56:08Z")

</div>

I’m OK… I finally be able

```auto
tag = {
				"name": tagName,
				"tagGroup": tagGroup,
				"tagType": "AtomicTag",
				"valueSource": "opc",
				"dataType": tagDataType,
				"opcItemPath":
					{
					"bindType":"parameter",
					"binding":"{OPCpath}.{TagName}"
					},
				"opcServer":
					{
					"bindType":"parameter",
					"binding":"{OPCserver}"
					},
				"engUnit": "m\xb2" 
			}
			collisionPolicy = "o"
			system.tag.configure(tagPath, [tag], collisionPolicy)

```
