# Equipment schedule data

**URL:** <https://forum.inductiveautomation.com/t/equipment-schedule-data/85504>\
**Category:** General Discussion\
**Tags:** perspective\
**Created:** [February 9, 2024, 9:23pm UTC](https://forum.inductiveautomation.com/t/equipment-schedule-data/85504 "2024-02-09T21:23:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrd](https://avatars.discourse-cdn.com/v4/letter/j/b9bd4f/32.png) [@jrd](https://forum.inductiveautomation.com/u/jrd)\
**Post date:** [February 9, 2024, 9:24pm UTC](https://forum.inductiveautomation.com/t/equipment-schedule-data/85504/1 "2024-02-09T21:24:00Z")

</div>

I would like to add additional elements to the scheduledEvents data. Currently the data looks like this:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/7/37f2f16ae4768da3d5683ab4f310113a0549ab9f.png)  
I would like to add an extra key:value pair, eg "my data":12345  
Is this possible? How would I do it? I have made many attempts at applying a transform, but without success

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [February 9, 2024, 11:17pm UTC](https://forum.inductiveautomation.com/t/equipment-schedule-data/85504/2 "2024-02-09T23:17:37Z")

</div>

Just hover beside the array element 0 and hit the + button when it appears.

![Scheduled events](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/1/81486f14e5dd8253e714404c88ccffed8fd9fc4d.gif)

Note that "my data" is an illegal key due to the space character.

---

<div class="post-metadata">

**Author:** ![jrd](https://avatars.discourse-cdn.com/v4/letter/j/b9bd4f/32.png) [@jrd](https://forum.inductiveautomation.com/u/jrd)\
**Post date:** [February 10, 2024, 3:09am UTC](https://forum.inductiveautomation.com/t/equipment-schedule-data/85504/3 "2024-02-10T03:09:03Z")

</div>

Thank you  
I am familiar with adding elements manually. As I suggested I would like to do it programmatically via a binding in the binding (the binding is to a database table)  
Not sure that is possible

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [February 10, 2024, 3:31am UTC](https://forum.inductiveautomation.com/t/equipment-schedule-data/85504/4 "2024-02-10T03:31:54Z")

</div>

I don't use the Equipment Schedule component but the items property is just an array of objects so it should be possible to script it.

Can you post your code?

---

<div class="post-metadata">

**Author:** ![YF129701](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/yf129701/32/60498_2.png) [@YF129701](https://forum.inductiveautomation.com/u/YF129701)\
**Post date:** [February 12, 2024, 4:00pm UTC](https://forum.inductiveautomation.com/t/equipment-schedule-data/85504/5 "2024-02-12T16:00:44Z")

</div>

The only way to have a binding on the `scheduleEvents` object and to then add a new event through scripting would be to add the new event to your schedule events table (the one you're querying from in the binding) and then doing a binding refresh after it's been added to get the new item.

There is no good way to persist an item besides doing what I outline above (IMO). You can, of course, add it in scripting, but any time the binding refreshes, it'll just pull whatever your Named Query returns and delete anything you added programmatically.

---

<div class="post-metadata">

**Author:** ![jrd](https://avatars.discourse-cdn.com/v4/letter/j/b9bd4f/32.png) [@jrd](https://forum.inductiveautomation.com/u/jrd)\
**Post date:** [February 12, 2024, 11:42pm UTC](https://forum.inductiveautomation.com/t/equipment-schedule-data/85504/6 "2024-02-12T23:42:36Z")

</div>

All good  
I found a solution by creating a 'dummy' column in the database, so that the 'dummy' attribute would be added to all instances of events. I can then access 'dummy' programmatically
