# Perspective Message Handler not working properly

**URL:** <https://forum.inductiveautomation.com/t/perspective-message-handler-not-working-properly/86501>\
**Category:** Ignition\
**Tags:** database, ignition81, perspective, scripting\
**Created:** [February 28, 2024, 12:10pm UTC](https://forum.inductiveautomation.com/t/perspective-message-handler-not-working-properly/86501 "2024-02-28T12:10:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Priyanka.Khandge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/priyanka.khandge/32/35989_2.png) [@Priyanka.Khandge](https://forum.inductiveautomation.com/u/Priyanka.Khandge)\
**Post date:** [February 28, 2024, 12:10pm UTC](https://forum.inductiveautomation.com/t/perspective-message-handler-not-working-properly/86501/1 "2024-02-28T12:10:07Z")

</div>

Hi everyone,

I'm currently employing a perspective message handler for the component. Within my table, each column utilizes a view-selected row update triggered by clicking the Update button (which is also accessible within each table column).

Incorporate receiving the message from the Update button within the root view for the CellName, and utilize the value of this parameter in the onActionPerformed event for updating the selected row.

Currently, I'm encountering an issue during row updates where updating only the Single column triggers automatic updates for other columns, resulting in either blank values or random data being populated. This occurs inconsistently across different columns.

Here's an overview of the data before updating:

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

After updating the data (where only the Description column has been updated, but other columns are automatically updated with blank values).

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

Any idea how to fix this?

Thanks,  
Priyanka Khandge

---

<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 28, 2024, 3:57pm UTC](https://forum.inductiveautomation.com/t/perspective-message-handler-not-working-properly/86501/2 "2024-02-28T15:57:45Z")

</div>

> [@Priyanka.Khandge](#):
>
> ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/0/909b07c6f5db640699903547610b129d28b771ca.png)
> 
> Currently, I'm encountering an issue during row updates where updating only the CellName column triggers automatic updates for other columns, resulting in either blank values or random data being populated. This occurs inconsistently across different columns.
> 
> Here's an overview of the data before updating:

I don't understand this part, frankly... Can you explain why you have a message handler on the Update button to update the row values instead of on the Table component? Also, what is the purpose of that button, to pull new data from a DB for just that row? Last thing - is the CellName parameter an outgoing parameter on your button view?

---

<div class="post-metadata">

**Author:** ![Priyanka.Khandge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/priyanka.khandge/32/35989_2.png) [@Priyanka.Khandge](https://forum.inductiveautomation.com/u/Priyanka.Khandge)\
**Post date:** [February 28, 2024, 5:00pm UTC](https://forum.inductiveautomation.com/t/perspective-message-handler-not-working-properly/86501/3 "2024-02-28T17:00:23Z")

</div>

@YF129701 Thanks for the response.

I have used a message handler on the update button because in my case all columns are used to view. The update button column also uses view.

Pass the selected row value to the updated button view using the message handler.

CellName parameter is an incoming parameter.

---

<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 28, 2024, 5:36pm UTC](https://forum.inductiveautomation.com/t/perspective-message-handler-not-working-properly/86501/4 "2024-02-28T17:36:42Z")

</div>

If I'm understanding you correctly and you're rendering each column as a view, then when you do `event.value` in the `onEditCellCommit` component event, I'm almost certain it will be null (or "").

As a test, add this line to the beginning of your `onEditCellCommit` script:

```python
self.print("event.value: {}, type(event.value): {}".format(event.value, type(event.value))) 

```

---

<div class="post-metadata">

**Author:** ![Priyanka.Khandge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/priyanka.khandge/32/35989_2.png) [@Priyanka.Khandge](https://forum.inductiveautomation.com/u/Priyanka.Khandge)\
**Post date:** [February 29, 2024, 10:25am UTC](https://forum.inductiveautomation.com/t/perspective-message-handler-not-working-properly/86501/5 "2024-02-29T10:25:41Z")

</div>

The issue has been resolved; I had called the message handler in the wrong place.
