# Accessing Property Change Script

**URL:** <https://forum.inductiveautomation.com/t/accessing-property-change-script/68278>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [January 5, 2023, 7:24pm UTC](https://forum.inductiveautomation.com/t/accessing-property-change-script/68278 "2023-01-05T19:24:45Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tyler\_Folsom](https://avatars.discourse-cdn.com/v4/letter/t/8797f3/32.png) [@Tyler\_Folsom](https://forum.inductiveautomation.com/u/Tyler_Folsom)\
**Post date:** [January 5, 2023, 7:24pm UTC](https://forum.inductiveautomation.com/t/accessing-property-change-script/68278/1 "2023-01-05T19:24:45Z")

</div>

I inherited a project that utilizes a table posting ticketing information.  
I have successfully altered the property "data" binding (database query) changing the information that gets posted to the table. However, when active in preview mode, an error appears after selecting a row.

\*\*Error running property change script on Table.props.selection.data: Traceback (most recent call last): \*\*  
\*\*File "function:valueChanged", line 7, in valueChanged \*\*  
**KeyError: hhos\_id**

I can make the error go away by renaming the column[0]'s field from "id" to "hhos\_id".  
The new database table I created uses "id" instead of "hhos\_id" so I know why the **id** is an issue. The query passes the **id** twice, as **id** and **hhos\_id** to keep things happy.

The preferred solution would be to find where this mysterious line 7 is that is looking at the **Table.props.selection.data**.

I made a copy of the view, removed everything except the table, and the error still persists.

Any ideas out there? : )

Thank you a bunch!!

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [January 6, 2023, 12:52am UTC](https://forum.inductiveautomation.com/t/accessing-property-change-script/68278/2 "2023-01-06T00:52:10Z")

</div>

In the designer, right click on the table and select "Configure Events."

Look for an event that is has color:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/4/149d027d321d9f65fc2bb7e935f7157f92af3bd1.png)

One of these events probably has a script that contains "hhos\_id" in line 7.

---

<div class="post-metadata">

**Author:** ![amy.sudibyo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amy.sudibyo/32/38659_2.png) [@amy.sudibyo](https://forum.inductiveautomation.com/u/amy.sudibyo)\
**Post date:** [January 6, 2023, 4:06am UTC](https://forum.inductiveautomation.com/t/accessing-property-change-script/68278/3 "2023-01-06T04:06:28Z")

</div>

This looks like there is a property change script configured on your table data prop. Check your table props to see if there is a little script icon on the right hand side next to 'data'. Right-click to edit or remove your change script.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/8/b81b3ef6989dfdb86ccc8222bd08ad1bab8b03bb.png)

---

<div class="post-metadata">

**Author:** ![Tyler\_Folsom](https://avatars.discourse-cdn.com/v4/letter/t/8797f3/32.png) [@Tyler\_Folsom](https://forum.inductiveautomation.com/u/Tyler_Folsom)\
**Post date:** [January 6, 2023, 4:40am UTC](https://forum.inductiveautomation.com/t/accessing-property-change-script/68278/4 "2023-01-06T04:40:41Z")

</div>

Hi Justin, All of the **Configure Events** are empty. That was my thought, as well.

 ![Configure Events for Table](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/c/1c4f1b807aa237b022d33ed3811919170a6fe688.png)

---

<div class="post-metadata">

**Author:** ![Tyler\_Folsom](https://avatars.discourse-cdn.com/v4/letter/t/8797f3/32.png) [@Tyler\_Folsom](https://forum.inductiveautomation.com/u/Tyler_Folsom)\
**Post date:** [January 6, 2023, 4:47am UTC](https://forum.inductiveautomation.com/t/accessing-property-change-script/68278/5 "2023-01-06T04:47:16Z")

</div>

Hi Amy,

I attached a couple of images to show what I see. There is unfortunately no script tied to the data prop. There is the query and that is the binding. No transform associated with the table query either. After disabling the binding the error still occurs.The change script is empty. I am not certain why there appears to be an error in red there. I haven't figured out how to solve that yet.

![data prop Screenshot](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/a/6ad3f64c90651e1f0f86efdfba25afb7ed7a7eec.png)

 ![Change Script Empty](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/4/44fa213d638e8cbb2d6eadbb388a1aa250d11114.png)  
 ![Query](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/8/883cb8ccbcd4f660aab34c50dafd8e93a978f5a1.png)

---

<div class="post-metadata">

**Author:** ![amy.sudibyo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amy.sudibyo/32/38659_2.png) [@amy.sudibyo](https://forum.inductiveautomation.com/u/amy.sudibyo)\
**Post date:** [January 6, 2023, 5:22am UTC](https://forum.inductiveautomation.com/t/accessing-property-change-script/68278/6 "2023-01-06T05:22:57Z")

</div>

I just re-read your original post and saw the error is on table.props.selection.data - is there a change script there?

What errors show up when you hover over the red error icon?

---

<div class="post-metadata">

**Author:** ![Tyler\_Folsom](https://avatars.discourse-cdn.com/v4/letter/t/8797f3/32.png) [@Tyler\_Folsom](https://forum.inductiveautomation.com/u/Tyler_Folsom)\
**Post date:** [January 6, 2023, 1:49pm UTC](https://forum.inductiveautomation.com/t/accessing-property-change-script/68278/7 "2023-01-06T13:49:32Z")

</div>

Sometimes I am not the brightest. I will admit I have tried more than once to hover/click on the red error icon and nothing ever appeared. Today, I was a little more patient and there _poof_ the errors show up. They were all pertaining to me leaving _null_ for the header fontsize.

There is no change script tied to the table. Please see the screenshot shared above.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [January 6, 2023, 2:03pm UTC](https://forum.inductiveautomation.com/t/accessing-property-change-script/68278/8 "2023-01-06T14:03:18Z")

</div>

Did you try searching for "hhos\_id" with the search tool ?

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [January 6, 2023, 2:49pm UTC](https://forum.inductiveautomation.com/t/accessing-property-change-script/68278/9 "2023-01-06T14:49:32Z")

</div>

> [@Tyler\_Folsom](#):
>
> There is no change script tied to the table.

Your screen shot does not show _table.props. **selection**.data_.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/d/0d9621407fcc1ef103e278f08093bd03cefefc02.png)

---

<div class="post-metadata">

**Author:** ![Tyler\_Folsom](https://avatars.discourse-cdn.com/v4/letter/t/8797f3/32.png) [@Tyler\_Folsom](https://forum.inductiveautomation.com/u/Tyler_Folsom)\
**Post date:** [January 6, 2023, 7:29pm UTC](https://forum.inductiveautomation.com/t/accessing-property-change-script/68278/10 "2023-01-06T19:29:47Z")

</div>

> [@pascal.fragnoud](#):
>
> Did you try searching for "hhos\_id" with the search tool ?

That worked! There is an onChange script (line 7) that the search found. I still didn't know how to locate the script but...

Mr. Jordan Clark, your advice worked, as well. The change script is tied to data under the selection property. It is light grey in color so I never noticed it or gave it much attention.

THANK YOU everyone for offering your help here. I appreciate the help so much!!

 ![Screen Shot 2023-01-06 at 1.58.01 PM](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/e/cecea402d63ac581141cbb9d4d70daad944884c6.png)

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [January 7, 2023, 8:58am UTC](https://forum.inductiveautomation.com/t/accessing-property-change-script/68278/11 "2023-01-07T08:58:13Z")

</div>

> [@Tyler\_Folsom](#):
>
> I still didn't know how to locate the script but...

The part on the left should tell you where it's located (the truncated part in your screenshot).

---

<div class="post-metadata">

**Author:** ![Tyler\_Folsom](https://avatars.discourse-cdn.com/v4/letter/t/8797f3/32.png) [@Tyler\_Folsom](https://forum.inductiveautomation.com/u/Tyler_Folsom)\
**Post date:** [January 7, 2023, 10:03pm UTC](https://forum.inductiveautomation.com/t/accessing-property-change-script/68278/12 "2023-01-07T22:03:06Z")

</div>

Yes, it does.  
'views/Ticketing/TicketTableBackup/root/Table (onChange script on 'props.selection.data'

I was not thinking smart enough to right click on props.selection.data to access **Edit Change Script**.
