# Updating template one variable at a time

**URL:** https://discourse.nodered.org/t/updating-template-one-variable-at-a-time/4546
**Category:** Dashboard
**Created:** [4 November 2018 00:09 UTC](https://discourse.nodered.org/t/updating-template-one-variable-at-a-time/4546 "2018-11-04T00:09:31Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)
#### Post date: [4 November 2018 14:38 UTC](https://discourse.nodered.org/t/updating-template-one-variable-at-a-time/4546/3 "2018-11-04T14:38:22Z")

</div>

> [@Marooned](#):
>
> I would expect to update only ones with passed value but it looks like the whole template is being updated on every incoming message?

The whole template will be updated with the msg properties. In you example, when `msg.a` is `undefined ` then

```auto
<div>
    <div>a: {{msg.a}}</div>
    <div>b: {{msg.b}}</div>
</div>

```

will result :

![r-01](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/9/9901bb65b78aadbb14c11f6f28a850f6c08ea7a0.png)

This seems to be a reasonable and expected behavior, in my opinion.  
I have updated `msg.a` to `undefined`, so I expect this reflected in the dashboard.  
The bottom line is that it is necessary to add the required logic in the flow to craft the msg properties in the proper way. This is in line with what Colin suggested in his previous post (use a join node).

---

_[View the full topic](https://discourse.nodered.org/t/updating-template-one-variable-at-a-time/4546)._
