# DB2 template node - this.msg behaviour is not consisteent

**URL:** https://discourse.nodered.org/t/db2-template-node-this-msg-behaviour-is-not-consisteent/96218
**Category:** Dashboard
**Tags:** dashboard-2
**Created:** [24 March 2025 13:41 UTC](https://discourse.nodered.org/t/db2-template-node-this-msg-behaviour-is-not-consisteent/96218 "2025-03-24T13:41:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![SandeepA](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sandeepa/32/63225_2.png) [@SandeepA](https://discourse.nodered.org/u/SandeepA)
#### Post date: [24 March 2025 13:41 UTC](https://discourse.nodered.org/t/db2-template-node-this-msg-behaviour-is-not-consisteent/96218/1 "2025-03-24T13:41:28Z")

</div>

Hi

I have below below

DB2 Button --\> Function Node --\> Sends message to DB2 Template Node.  
One of the attributes on msg changes based on Button.  
Not the problem - if the attribute is deleted msg - yet Template node sees as attribute defines.

Step 1 -

Send msg with msg.x = ABC  
Template node gets it.  
when i do alert(this.msg.x) in template node i see ABC

Step 2 -  
delete msg.x or set msg.x = undefined.  
Template node gets it.  
when i do alert(this.msg.x) in template node i still see ABC

I am not clear how it works.

---

<div class="post-metadata">

### Author: ![SandeepA](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sandeepa/32/63225_2.png) [@SandeepA](https://discourse.nodered.org/u/SandeepA)
#### Post date: [24 March 2025 15:43 UTC](https://discourse.nodered.org/t/db2-template-node-this-msg-behaviour-is-not-consisteent/96218/3 "2025-03-24T15:43:18Z")

</div>

Cancelling this as it was development issue.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [7 April 2025 15:43 UTC](https://discourse.nodered.org/t/db2-template-node-this-msg-behaviour-is-not-consisteent/96218/4 "2025-04-07T15:43:35Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
