# Writing table component data to an array tag

**URL:** <https://forum.inductiveautomation.com/t/writing-table-component-data-to-an-array-tag/52532>\
**Category:** Ignition\
**Tags:** ignition81, vision\
**Created:** [October 30, 2021, 8:22pm UTC](https://forum.inductiveautomation.com/t/writing-table-component-data-to-an-array-tag/52532 "2021-10-30T20:22:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jshaffer09](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@jshaffer09](https://forum.inductiveautomation.com/u/jshaffer09)\
**Post date:** [October 30, 2021, 8:22pm UTC](https://forum.inductiveautomation.com/t/writing-table-component-data-to-an-array-tag/52532/1 "2021-10-30T20:22:45Z")

</div>

I am testing a new project which I am trying to write table component data to an array tag that is part of a UDT in the PLC. I will eventually be writing to 4 different PLC’s. The total array for the UDT is 501 skipping 0, so a total of 500 customers. I assume that I would setup the script to read the table data and then write to the tag array using a for loop. But I wasn’t for sure if system.tag.write would work in this case? Is there any certain scripting function you have to use for something like this. Any one worked on a project like this? I only need to write to two tags for each customer (Configuration and Name.)

Tag path one: [default]Test PLC 1/Customer/Customer\_0\_/Configuration  
Tag path two: [default]Test PLC 1/Customer/Customer\_0\_/Name  
Tag structure pic. The two red circle are the ones I need to write to.  
 ![Capture](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/7/57df55dc1f7450c15a5fe2517aaad2c1787cc127.png)

additional info for the current screen in ignition.  
One tag will be tied to a button on a HMI (Name). The other tag is the (Configuration) Number. The table data is pulled from a database table. I am using a alternate ID column so I can continue to keep the Customers in ABC order as new ones are added.

---

<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:** [October 30, 2021, 9:39pm UTC](https://forum.inductiveautomation.com/t/writing-table-component-data-to-an-array-tag/52532/2 "2021-10-30T21:39:44Z")

</div>

System.tag.\* should work, but you might consider just using system.opc.\* for on-demand communications. It really depends on whether you need all of this data available live in Ignition for other purposes.

---

<div class="post-metadata">

**Author:** ![jshaffer09](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@jshaffer09](https://forum.inductiveautomation.com/u/jshaffer09)\
**Post date:** [October 30, 2021, 9:46pm UTC](https://forum.inductiveautomation.com/t/writing-table-component-data-to-an-array-tag/52532/3 "2021-10-30T21:46:40Z")

</div>

ok I will look at system.opc but there might be a time I need to display the data to show managment what is in each PLC.

---

<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:** [October 30, 2021, 10:06pm UTC](https://forum.inductiveautomation.com/t/writing-table-component-data-to-an-array-tag/52532/4 "2021-10-30T22:06:57Z")

</div>

A driven tag group might be a compromise.

---

<div class="post-metadata">

**Author:** ![jshaffer09](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@jshaffer09](https://forum.inductiveautomation.com/u/jshaffer09)\
**Post date:** [October 30, 2021, 10:15pm UTC](https://forum.inductiveautomation.com/t/writing-table-component-data-to-an-array-tag/52532/5 "2021-10-30T22:15:42Z")

</div>

What do you mean by A driven tag group might be a compromise?

---

<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:** [October 30, 2021, 10:28pm UTC](https://forum.inductiveautomation.com/t/writing-table-component-data-to-an-array-tag/52532/6 "2021-10-30T22:28:41Z")

</div>

I mean that subscribing to a large array of a complex structure might be an unjustified load on your PLC comms for occassional display and editing activity. If that matters to you (it matters to most). Using system.opc.\* to bypass the tag system is one method to access these PLC values only when needed. A driven subscription is another way. (The subscription is active only when a particular condition is true.) You haven’t really shared enough about the environment to be more specific.

---

<div class="post-metadata">

**Author:** ![jshaffer09](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@jshaffer09](https://forum.inductiveautomation.com/u/jshaffer09)\
**Post date:** [October 30, 2021, 10:34pm UTC](https://forum.inductiveautomation.com/t/writing-table-component-data-to-an-array-tag/52532/7 "2021-10-30T22:34:48Z")

</div>

I see what you are saying. Most of the time I will only have to write to the tags once or twice a month. Some months it might be alittle more. So using the system.opc in this case might be the best solution but If I do have to display the data at some point then I could use the driven tag group.
