# Update opc tags from a vision table?

**URL:** <https://forum.inductiveautomation.com/t/update-opc-tags-from-a-vision-table/45599>\
**Category:** Ignition\
**Created:** [April 14, 2021, 4:25pm UTC](https://forum.inductiveautomation.com/t/update-opc-tags-from-a-vision-table/45599 "2021-04-14T16:25:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rjohnson](https://avatars.discourse-cdn.com/v4/letter/r/5fc32e/32.png) [@rjohnson](https://forum.inductiveautomation.com/u/rjohnson)\
**Post date:** [April 14, 2021, 4:25pm UTC](https://forum.inductiveautomation.com/t/update-opc-tags-from-a-vision-table/45599/1 "2021-04-14T16:25:02Z")

</div>

![IgnitionExample](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/e/4eca01982bc8e569a55c3dc2fbab314e23756cfe.png)

The idea is that the client can select the value, and modify the setpoint from that table. This isn’t data coming from any historian or any sort of SQL server (such and such), it’s all live OPC data coming in from my PLC. I can figure out a way to update the table when the opc tag changes, but if i try to edit the table, the opc tag that the cell is bound to using the Cell Update binding doesn’t change the OPC tag.

If there is a better/easier way to do this, I don’t necessarily need to use a table, just anything that I can pair up with the analog indicator. I was originally looking to have a drop down component. The user would select which setpoint he’d want from that, and modify it after he selected it. The indicator on the left would then show the changes.

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [April 14, 2021, 5:07pm UTC](https://forum.inductiveautomation.com/t/update-opc-tags-from-a-vision-table/45599/2 "2021-04-14T17:07:05Z")

</div>

Just put a hidden column in the table that contains the tag path and then utilize on the OnCellEdited method of the table and issue a system.tag.write call to write the value to the tag?

---

<div class="post-metadata">

**Author:** ![rjohnson](https://avatars.discourse-cdn.com/v4/letter/r/5fc32e/32.png) [@rjohnson](https://forum.inductiveautomation.com/u/rjohnson)\
**Post date:** [April 14, 2021, 5:30pm UTC](https://forum.inductiveautomation.com/t/update-opc-tags-from-a-vision-table/45599/3 "2021-04-14T17:30:30Z")

</div>

Ah! Brilliant! Thank you!

---

<div class="post-metadata">

**Author:** ![dzohner](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@dzohner](https://forum.inductiveautomation.com/u/dzohner)\
**Post date:** [June 30, 2021, 7:19pm UTC](https://forum.inductiveautomation.com/t/update-opc-tags-from-a-vision-table/45599/4 "2021-06-30T19:19:52Z")

</div>

Is there any chance you could create a code snippet of how this would work. I’ve created the hidden column I’ve put in the tag paths in that column but struggling figuring out how to take the value on one column and write it to the tag in the other column.

Any help is appreciated.  
Thanks.

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [July 1, 2021, 4:22pm UTC](https://forum.inductiveautomation.com/t/update-opc-tags-from-a-vision-table/45599/5 "2021-07-01T16:22:50Z")

</div>

The below assumes you are editing COLUMN 0 and the Tagpath is in COLUMN 1  
Adjust as needed.

```auto
	if colIndex==0:
		tPath = self.data.getValueAt(rowIndex,1)
		system.tag.write(tPath,newValue)
		self.data = system.dataset.setValue(self.data, rowIndex, colIndex, newValue)	
		print tPath

```

---

<div class="post-metadata">

**Author:** ![dzohner](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@dzohner](https://forum.inductiveautomation.com/u/dzohner)\
**Post date:** [July 1, 2021, 6:12pm UTC](https://forum.inductiveautomation.com/t/update-opc-tags-from-a-vision-table/45599/6 "2021-07-01T18:12:41Z")

</div>

Thank you this solution worked for me
