# Tag readOnly parameter modify

**URL:** <https://forum.inductiveautomation.com/t/tag-readonly-parameter-modify/106497>\
**Category:** Ignition\
**Tags:** ignition81, scripting\
**Created:** [May 21, 2025, 11:39am UTC](https://forum.inductiveautomation.com/t/tag-readonly-parameter-modify/106497 "2025-05-21T11:39:45Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jorge\_Dalzotto](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@Jorge\_Dalzotto](https://forum.inductiveautomation.com/u/Jorge_Dalzotto)\
**Post date:** [May 21, 2025, 11:39am UTC](https://forum.inductiveautomation.com/t/tag-readonly-parameter-modify/106497/1 "2025-05-21T11:39:45Z")

</div>

Hi everyone, I have a question, I need into the tag property edit the "readOnly" parameter.  
I tried use system.tag.getConfigure(...), modify the "readOnly" property and next use system.tag.configure(...) to aply the new config to tag.  
It work, but, many others property were mark with "overide".  
I need only modify (aplied a "overide") to this parameter and not another. Is that possible? Any idea?  
Thk

---

<div class="post-metadata">

**Author:** ![Jorge\_Dalzotto](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@Jorge\_Dalzotto](https://forum.inductiveautomation.com/u/Jorge_Dalzotto)\
**Post date:** [May 21, 2025, 1:20pm UTC](https://forum.inductiveautomation.com/t/tag-readonly-parameter-modify/106497/2 "2025-05-21T13:20:40Z")

</div>

Hi again, I found "one" solution...and I created a function for this..

```python
def setTagProperty(tagPath, propertyName, propertyValue):
	config = system.tag.getConfiguration(tagPath, False)
	basePath = '/'.join(tagPath.split('/')[:-1])
	pattern = ["path", propertyName]
	
	for key in config[0]:
		if key not in pattern:
			a = config[0].pop(key)
	config[0][propertyName]	= propertyValue
	
	return system.tag.configure(basePath, config)

```

Use:

```python
pathTag = "[node]PV/INV/INV_1/DATA/GENERAL/IHMI/OUT_W_SET/BLK_ENA"
setTagProperty(pathTag,"readOnly",True)

```

I listen to other ideas...

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [May 21, 2025, 1:31pm UTC](https://forum.inductiveautomation.com/t/tag-readonly-parameter-modify/106497/3 "2025-05-21T13:31:19Z")

</div>

edit: nope, mistake

That said, if you're pulling the config with `system.tag.getConfiguration`, you should only be writing back what was already configured.

I'm getting good results with

```python

def setTagProp(tagpath, propname, value):
	conf = system.tag.getConfiguration(tagpath, recursive=False)[0]
	conf[propname] = value
	system.tag.configure(tagpath[:-len(conf['name'])], [conf])

```

---

<div class="post-metadata">

**Author:** ![Jorge\_Dalzotto](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@Jorge\_Dalzotto](https://forum.inductiveautomation.com/u/Jorge_Dalzotto)\
**Post date:** [May 21, 2025, 2:06pm UTC](https://forum.inductiveautomation.com/t/tag-readonly-parameter-modify/106497/4 "2025-05-21T14:06:37Z")

</div>

I tried that — in fact, it was my first choice — but many other properties were marked with 'override'.  
Per example "script", "alarms", etc. This elements existed in the dict from system.tag.getConfiguration(...) and It were marked with "override" after of use system.tag.configure().  
I created tags from a UDT, maybe it's related.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [May 21, 2025, 2:07pm UTC](https://forum.inductiveautomation.com/t/tag-readonly-parameter-modify/106497/5 "2025-05-21T14:07:30Z")

</div>

You can just create the barebones tag json yourself with just the tag name and the readOnly prop, and write it with tag.configure ensuring to set the mode to merge with "m". No need to use getConfiguration

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [May 21, 2025, 2:18pm UTC](https://forum.inductiveautomation.com/t/tag-readonly-parameter-modify/106497/6 "2025-05-21T14:18:16Z")

</div>

I thought I tried that and it didn't work...  
Maybe I messed something up

---

<div class="post-metadata">

**Author:** ![Jorge\_Dalzotto](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@Jorge\_Dalzotto](https://forum.inductiveautomation.com/u/Jorge_Dalzotto)\
**Post date:** [May 21, 2025, 2:26pm UTC](https://forum.inductiveautomation.com/t/tag-readonly-parameter-modify/106497/7 "2025-05-21T14:26:46Z")

</div>

Yes, It work, and It very simple and elegant.

```python
parentPath = "[default]IHMI/OUT_W_SET"
param = system.util.jsonEncode(
	{	"readOnly"	: True,
		"name" : "BLK_ENA"})
system.tag.configure(parentPath, param,'m')

```

Thank you.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [May 21, 2025, 2:32pm UTC](https://forum.inductiveautomation.com/t/tag-readonly-parameter-modify/106497/8 "2025-05-21T14:32:35Z")

</div>

You don't need to encode it to json.

```python
def setTagProp(tagpath, propname, value):
	if '/' in tagpath:
		path, name = tagpath.rsplit('/')
	else:
		path, sep, name = tagpath.partition(']')
		path += sep
	tag = {
		'name': name,
		propname: value
	}
	system.tag.configure(path, [tag], 'm')

```

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [May 21, 2025, 3:33pm UTC](https://forum.inductiveautomation.com/t/tag-readonly-parameter-modify/106497/9 "2025-05-21T15:33:19Z")

</div>

I would expect `system.tag.writeBlocking(["path/to/tag.readOnly"], [True])` to work as well.

---

<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:** [May 21, 2025, 3:37pm UTC](https://forum.inductiveautomation.com/t/tag-readonly-parameter-modify/106497/10 "2025-05-21T15:37:41Z")

</div>

> [@paul-griffith](#):
>
> to work as well.

Yes, but once set to `True`, you cannot use `.writeBlocking` to set it back to `False`. Only `.configure` can do that.

---

<div class="post-metadata">

**Author:** ![Jorge\_Dalzotto](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@Jorge\_Dalzotto](https://forum.inductiveautomation.com/u/Jorge_Dalzotto)\
**Post date:** [May 21, 2025, 4:08pm UTC](https://forum.inductiveautomation.com/t/tag-readonly-parameter-modify/106497/11 "2025-05-21T16:08:06Z")

</div>

Exactly, That It were the main problem, set to False from True to protect and unprotect the tag writing.  
Thank everyone.
