# Editing OPC path using system.tag.editTag

**URL:** <https://forum.inductiveautomation.com/t/editing-opc-path-using-system-tag-edittag/18021>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [May 14, 2018, 4:58pm UTC](https://forum.inductiveautomation.com/t/editing-opc-path-using-system-tag-edittag/18021 "2018-05-14T16:58:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ndutra](https://avatars.discourse-cdn.com/v4/letter/n/f0a364/32.png) [@ndutra](https://forum.inductiveautomation.com/u/ndutra)\
**Post date:** [May 14, 2018, 4:58pm UTC](https://forum.inductiveautomation.com/t/editing-opc-path-using-system-tag-edittag/18021/1 "2018-05-14T16:58:22Z")

</div>

I am trying to use the system.tag.editTag function to modify the OPC path when a button is pressed when this action is done I get an error in published environment and does not work. Any suggestions or corrections?

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/9/9807fa9e679d20601f46c242cba069d7774b0aa2.jpg)

system.tag.editTag(tagPath="[default]Motor\_FVNR\_HOA\_0", attributes={“OPCItemPath”:"[LOD\_W\_CRUSH\_TCC]S1\_Area\_Cntl.Pomace\_Incline2.PV\_HOA"})

---

<div class="post-metadata">

**Author:** ![Paul.Scott](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul.scott/32/4578_2.png) [@Paul.Scott](https://forum.inductiveautomation.com/u/Paul.Scott)\
**Post date:** [May 14, 2018, 9:55pm UTC](https://forum.inductiveautomation.com/t/editing-opc-path-using-system-tag-edittag/18021/2 "2018-05-14T21:55:04Z")

</div>

Without being able to see the actual error, I’m guessing [Client Permissions](https://docs.inductiveautomation.com/display/DOC79/Project+Properties#ProjectProperties-ClientPermissions) located in the Project’s Properties is preventing you from editing your tags on the Client. Specifically, **Tag Editing**

Enable Tag Editing, and the clients should be able to run your script.

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [May 16, 2018, 6:06am UTC](https://forum.inductiveautomation.com/t/editing-opc-path-using-system-tag-edittag/18021/3 "2018-05-16T06:06:08Z")

</div>

Just a heads up, this will also work, assuming proper permissions and stuff

```auto
system.tag.write("[default]Motor_FVNR_HOA_0.OPCItemPath","[LOD_W_CRUSH_TCC]S1_Area_Cntl.Pomace_Incline2.PV_HOA")

```

---

<div class="post-metadata">

**Author:** ![ndutra](https://avatars.discourse-cdn.com/v4/letter/n/f0a364/32.png) [@ndutra](https://forum.inductiveautomation.com/u/ndutra)\
**Post date:** [May 16, 2018, 4:04pm UTC](https://forum.inductiveautomation.com/t/editing-opc-path-using-system-tag-edittag/18021/4 "2018-05-16T16:04:40Z")

</div>

Client permissions were the issue, Thank you for your time!

---

<div class="post-metadata">

**Author:** ![ndutra](https://avatars.discourse-cdn.com/v4/letter/n/f0a364/32.png) [@ndutra](https://forum.inductiveautomation.com/u/ndutra)\
**Post date:** [May 16, 2018, 4:07pm UTC](https://forum.inductiveautomation.com/t/editing-opc-path-using-system-tag-edittag/18021/5 "2018-05-16T16:07:17Z")

</div>

Nice ! I was not aware of that.
