# Writing to integer array tag from SDK

**URL:** <https://forum.inductiveautomation.com/t/writing-to-integer-array-tag-from-sdk/99317>\
**Category:** Module Development\
**Created:** [December 2, 2024, 4:52pm UTC](https://forum.inductiveautomation.com/t/writing-to-integer-array-tag-from-sdk/99317 "2024-12-02T16:52:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nick\_Gendron1](https://avatars.discourse-cdn.com/v4/letter/n/5daacb/32.png) [@Nick\_Gendron1](https://forum.inductiveautomation.com/u/Nick_Gendron1)\
**Post date:** [December 2, 2024, 4:52pm UTC](https://forum.inductiveautomation.com/t/writing-to-integer-array-tag-from-sdk/99317/1 "2024-12-02T16:52:31Z")

</div>

Hi all,  
I am working on a module that writes to tags and I am having trouble writing data to an integer array tag from the Ignition SDK.

The array data below is serialized into an ArrayList of integers which is added into the List for the method writeAsync(List tagPaths, List values, SecurityContext securityContext);

When my module tries to write array data, I am receiving the error Error\_TypeConversion("Cannot coerce value '[]' into type: class [Ljava.lang.Integer;").

Has anyone encountered a similar issue or have an example of writing array data to tags via the Ignition SDK?

arrayData = [0, 35, 0, 35, 0, 13, 0, 13, 6, -33, 6, -34, -1, -124, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, -1, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

---

<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:** [December 2, 2024, 4:54pm UTC](https://forum.inductiveautomation.com/t/writing-to-integer-array-tag-from-sdk/99317/2 "2024-12-02T16:54:35Z")

</div>

Have you tried actually writing an _array_?

As in, `new Integer[]`, not `new ArrayList<>()`.

You must pass a _list of objects_ to `writeAsync`, but the elements inside that list can be anything; so e.g.  
`writeAsync(List.of(tagPath), List.of(intArray), ...)`
