# Getting Custom Property as Array

**URL:** <https://forum.inductiveautomation.com/t/getting-custom-property-as-array/60118>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [May 27, 2022, 12:18pm UTC](https://forum.inductiveautomation.com/t/getting-custom-property-as-array/60118 "2022-05-27T12:18:05Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aybars.Urut](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/aybars.urut/32/32003_2.png) [@Aybars.Urut](https://forum.inductiveautomation.com/u/Aybars.Urut)\
**Post date:** [May 27, 2022, 12:18pm UTC](https://forum.inductiveautomation.com/t/getting-custom-property-as-array/60118/1 "2022-05-27T12:18:06Z")

</div>

Hi there,

I want to get a component custom property as an array.

As you know there is no array for datatype;  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/2/4223dd110ad065c648017be4aeec56de7837c293.png)

I can select string and i can use split for getting array. But it shouldnt be best way.

Is there any more usefull way?

\*main purpose: to be able to process row numbers by selecting them separately

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [May 27, 2022, 12:30pm UTC](https://forum.inductiveautomation.com/t/getting-custom-property-as-array/60118/2 "2022-05-27T12:30:33Z")

</div>

Use a dataset type with a single column?

---

<div class="post-metadata">

**Author:** ![rbabcock](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rbabcock/32/13425_2.png) [@rbabcock](https://forum.inductiveautomation.com/u/rbabcock)\
**Post date:** [May 27, 2022, 2:32pm UTC](https://forum.inductiveautomation.com/t/getting-custom-property-as-array/60118/3 "2022-05-27T14:32:15Z")

</div>

I’ve done this in the past. IIRC dataset cells can contain objects, so you may be able to use a single cell for your array.

---

<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:** [May 27, 2022, 2:40pm UTC](https://forum.inductiveautomation.com/t/getting-custom-property-as-array/60118/4 "2022-05-27T14:40:31Z")

</div>

Be careful with this - while datasets support arbitrary data types, _serialization_ does not, so you might think everything is working in the designer, then open the window in the client and have no data.

I would use a dataset in it’s “intended” form, as @lrose suggested.

---

<div class="post-metadata">

**Author:** ![Aybars.Urut](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/aybars.urut/32/32003_2.png) [@Aybars.Urut](https://forum.inductiveautomation.com/u/Aybars.Urut)\
**Post date:** [May 27, 2022, 2:50pm UTC](https://forum.inductiveautomation.com/t/getting-custom-property-as-array/60118/5 "2022-05-27T14:50:05Z")

</div>

I thought about using the dataset but for some reason I didn’t choose it. I changed what was causing this and used the dataset. seems to be working for now

Thanks for replies!

---

<div class="post-metadata">

**Author:** ![Dustin\_VanKeuren](https://avatars.discourse-cdn.com/v4/letter/d/b782af/32.png) [@Dustin\_VanKeuren](https://forum.inductiveautomation.com/u/Dustin_VanKeuren)\
**Post date:** [October 18, 2024, 4:17pm UTC](https://forum.inductiveautomation.com/t/getting-custom-property-as-array/60118/6 "2024-10-18T16:17:32Z")

</div>

My question would be why arrays are not allowed?

---

<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 18, 2024, 4:22pm UTC](https://forum.inductiveautomation.com/t/getting-custom-property-as-array/60118/7 "2024-10-18T16:22:08Z")

</div>

This old topic is implicitly Vision. Until very recently, there simply wasn't a safe way to encode arrays and other complex types except for datasets. Ignition v8 added the `Document` datatype to tags and Perspective, but it wasn't backported to Vision until now (8.1.44). The document datatype can hold arrays and mappings, including nested arrays and mappings.

---

<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:** [October 21, 2024, 3:35pm UTC](https://forum.inductiveautomation.com/t/getting-custom-property-as-array/60118/8 "2024-10-21T15:35:07Z")

</div>

> [@pturmel](#):
>
> The document datatype can hold arrays and mappings, including nested arrays and mappings.

Minor point of clarification: The document support that was added to Vision recently only supports top level _objects_. They can obviously contain any document element type inside, but at the top level _must_ be objects. I explored supporting any element type briefly, but Vision's property and editing model really doesn't know how to handle something that can be either a 'primitive' like a string/number, _or_ a complex object, _or_ a complex array.

---

<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 21, 2024, 11:05pm UTC](https://forum.inductiveautomation.com/t/getting-custom-property-as-array/60118/9 "2024-10-21T23:05:10Z")

</div>

> [@paul-griffith](#):
>
> but at the top level _must_ be objects.

Ah, hadn't tested yet, but not surprised.
