# Perspective, add items in array of props, with default values for items props

**URL:** <https://forum.inductiveautomation.com/t/perspective-add-items-in-array-of-props-with-default-values-for-items-props/39041>\
**Category:** Ignition\
**Tags:** ignition80, perspective\
**Created:** [September 24, 2020, 6:51pm UTC](https://forum.inductiveautomation.com/t/perspective-add-items-in-array-of-props-with-default-values-for-items-props/39041 "2020-09-24T18:51:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [September 24, 2020, 6:51pm UTC](https://forum.inductiveautomation.com/t/perspective-add-items-in-array-of-props-with-default-values-for-items-props/39041/1 "2020-09-24T18:51:32Z")

</div>

In perspective, in the desigenr when you click “+” next to pens, for example in the power chart component,

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/1/91bf19672e02aedffb239a635d84dba36981f985.png)

A new item is added in the array with an object structure with **default value**.

Is there a way to create a new item in pens array by script, but without specify all the props in order some props take default values ?

---

<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:** [September 24, 2020, 6:58pm UTC](https://forum.inductiveautomation.com/t/perspective-add-items-in-array-of-props-with-default-values-for-items-props/39041/2 "2020-09-24T18:58:04Z")

</div>

No, not in any dynamic way. That automatic behavior is a function of the JSON editor, not the actual property structure. You’d have to hardcode your ‘default’ elements for each possible value you would want to insert.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [September 24, 2020, 7:05pm UTC](https://forum.inductiveautomation.com/t/perspective-add-items-in-array-of-props-with-default-values-for-items-props/39041/3 "2020-09-24T19:05:00Z")

</div>

thanks, it was a bit utopian 🧙

---

<div class="post-metadata">

**Author:** ![rpulsifer](https://avatars.discourse-cdn.com/v4/letter/r/e9a140/32.png) [@rpulsifer](https://forum.inductiveautomation.com/u/rpulsifer)\
**Post date:** [February 14, 2022, 4:06pm UTC](https://forum.inductiveautomation.com/t/perspective-add-items-in-array-of-props-with-default-values-for-items-props/39041/4 "2022-02-14T16:06:51Z")

</div>

Maybe, but aren’t we all here because Ignition is a SCADA/HMI Utopia??!?  
Sorry @paul-griffith but I’m adding this to the wish list! maybe a system.perspective.addArrayElement is in our future…

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [February 15, 2022, 7:31am UTC](https://forum.inductiveautomation.com/t/perspective-add-items-in-array-of-props-with-default-values-for-items-props/39041/5 "2022-02-15T07:31:44Z")

</div>

I did hear they were working on adding custom ‘tooltips’ for properties. i suppose this is relativly similar as it also works with the json (atleast it does atm, no idea how they will implement it or when)
