# Dynamically change Gauge Units value

**URL:** <https://discourse.nodered.org/t/dynamically-change-gauge-units-value/46260>\
**Category:** Dashboard\
**Created:** [26 May 2021 09:13 UTC](https://discourse.nodered.org/t/dynamically-change-gauge-units-value/46260 "2021-05-26T09:13:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![NPT](https://avatars.discourse-cdn.com/v4/letter/n/9de053/32.png) [@NPT](https://discourse.nodered.org/u/NPT)\
**Post date:** [26 May 2021 09:13 UTC](https://discourse.nodered.org/t/dynamically-change-gauge-units-value/46260/1 "2021-05-26T09:13:01Z")

</div>

I am using a toggle function to change the values sent to a Gauge [MPH - Knots] and the principle gauge function is working well. The toggle also sets a global variable _speed\_units_ to reflect "MPH" or "KTS" depending on the state.

However I just cannot fathom how to modify the Gauge node units section to reflect the value of _speed\_units_. I must say I am very new to this!

I wonder if anyone can kindly advise if this is possible, please?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [26 May 2021 09:18 UTC](https://discourse.nodered.org/t/dynamically-change-gauge-units-value/46260/2 "2021-05-26T09:18:16Z")

</div>

Providing a simple version of your flow would make understanding your issue lots easier.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [26 May 2021 09:27 UTC](https://discourse.nodered.org/t/dynamically-change-gauge-units-value/46260/3 "2021-05-26T09:27:13Z")

</div>

The unit field will not take mustache template.  
but you can use {{speed\_var}} {{speed\_unit}} in the value format field

---

<div class="post-metadata">

**Author:** ![NPT](https://avatars.discourse-cdn.com/v4/letter/n/9de053/32.png) [@NPT](https://discourse.nodered.org/u/NPT)\
**Post date:** [26 May 2021 20:30 UTC](https://discourse.nodered.org/t/dynamically-change-gauge-units-value/46260/4 "2021-05-26T20:30:46Z")

</div>

That is totally brilliant! Thank you very much - we now have an excellent result!

---

<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:** [9 June 2021 20:31 UTC](https://discourse.nodered.org/t/dynamically-change-gauge-units-value/46260/5 "2021-06-09T20:31:33Z")

</div>

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