# Message handler not refreshing property

**URL:** <https://forum.inductiveautomation.com/t/message-handler-not-refreshing-property/54394>\
**Category:** Ignition\
**Tags:** ignition81, scripting, perspective\
**Created:** [December 22, 2021, 2:13pm UTC](https://forum.inductiveautomation.com/t/message-handler-not-refreshing-property/54394 "2021-12-22T14:13:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Resistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/resistor/32/30634_2.png) [@Resistor](https://forum.inductiveautomation.com/u/Resistor)\
**Post date:** [December 22, 2021, 2:13pm UTC](https://forum.inductiveautomation.com/t/message-handler-not-refreshing-property/54394/1 "2021-12-22T14:13:19Z")

</div>

I have a small table with a counter for manufactured parts.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/6/c635c01682e15eb8c8e734deacdf66971012d94a.png)  
I want to restart a count on pressing the button. e.g. it is 3 pm when the button is pressed, so the table should refresh / reset to 0 and start counting up again.

For this I want to use a tag history binding that uses now(0) (only poll once) as start date and so the button refreshes or resets the start date of the binding when it is pressed.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/4/4421817503c3e52140ee947aa6587ce069d46735.png)  
Here I am using a boolean count on when a new product is detected as ready.

I made an event for the button, onClick

```auto
system.perspective.sendMessage('refresh')

```

and a message handler called refresh on the table (I was trying with the first row to test)

```auto
self.refreshBinding('props.data[0].Products')

```

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/3/235de71b3b894dae3bed83baca3bde6aabb74b98.png)

But it is not working… is it a syntax problem or is this not the correct method to use for what I want to do?

---

<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:** [December 22, 2021, 2:24pm UTC](https://forum.inductiveautomation.com/t/message-handler-not-refreshing-property/54394/2 "2021-12-22T14:24:12Z")

</div>

Does `props.data[0].Products` itself have a binding ? Or is the binding on `props.data`, or something else ?

---

<div class="post-metadata">

**Author:** ![Resistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/resistor/32/30634_2.png) [@Resistor](https://forum.inductiveautomation.com/u/Resistor)\
**Post date:** [December 22, 2021, 2:36pm UTC](https://forum.inductiveautomation.com/t/message-handler-not-refreshing-property/54394/3 "2021-12-22T14:36:25Z")

</div>

Yes, it has a binding! Every row is binded using the same structure but to different tags.  
The picture above of the binding corresponds to `props.data[0]`

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/d/5d8505dc8918be17153e4fbe0517529d8ae1fe83.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/0/60d7532a48dcca70716c333086bdc5284c9e84e1.png)

---

<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:** [December 22, 2021, 3:05pm UTC](https://forum.inductiveautomation.com/t/message-handler-not-refreshing-property/54394/4 "2021-12-22T15:05:54Z")

</div>

Is it `Products` or `Product_count`?

---

<div class="post-metadata">

**Author:** ![Resistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/resistor/32/30634_2.png) [@Resistor](https://forum.inductiveautomation.com/u/Resistor)\
**Post date:** [December 22, 2021, 3:08pm UTC](https://forum.inductiveautomation.com/t/message-handler-not-refreshing-property/54394/5 "2021-12-22T15:08:29Z")

</div>

I just changed it to `Product_count` so that it is easier to explain

---

<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:** [December 22, 2021, 3:45pm UTC](https://forum.inductiveautomation.com/t/message-handler-not-refreshing-property/54394/6 "2021-12-22T15:45:13Z")

</div>

did you confirm the messages get recieved?

put in a log or print on the message handler and in the transformscript in the binding^^
