# Writing to multiple OPC items (UDT's)

**URL:** <https://discourse.nodered.org/t/writing-to-multiple-opc-items-udts/31725>\
**Category:** General\
**Created:** [19 August 2020 12:20 UTC](https://discourse.nodered.org/t/writing-to-multiple-opc-items-udts/31725 "2020-08-19T12:20:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SKleppe85](https://avatars.discourse-cdn.com/v4/letter/s/c6cbf5/32.png) [@SKleppe85](https://discourse.nodered.org/u/SKleppe85)\
**Post date:** [19 August 2020 12:20 UTC](https://discourse.nodered.org/t/writing-to-multiple-opc-items-udts/31725/1 "2020-08-19T12:20:35Z")

</div>

Hi,

I'm currently working on an application where I need to be able to write a bunch of parameters for different UDT's from a mySQL database.  
I have figured out how to read the values from the database, so the next step is to figure out how to write these to their corresponding OPC item path , using OPC UA.

Simplified Use-Case:

Loaded values from mySQL:  
[1,2,3,4,5,6,7,8,9,10]

OPC Itempaths:  
Pump[0-10].AlarmSetpoint

Result wanted:

Pump[0].AlarmSetpoint = 1  
Pump[1].AlarmSetpoint = 2  
etc...

Any tricks out there to do this in an "easy" way?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [18 October 2020 12:20 UTC](https://discourse.nodered.org/t/writing-to-multiple-opc-items-udts/31725/2 "2020-10-18T12:20:36Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
