# Node-Red Influxdb In Querry field

**URL:** <https://discourse.nodered.org/t/node-red-influxdb-in-querry-field/67002>\
**Category:** General\
**Created:** [27 August 2022 11:47 UTC](https://discourse.nodered.org/t/node-red-influxdb-in-querry-field/67002 "2022-08-27T11:47:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mojgithub](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mojgithub/32/63532_2.png) [@mojgithub](https://discourse.nodered.org/u/mojgithub)\
**Post date:** [27 August 2022 11:47 UTC](https://discourse.nodered.org/t/node-red-influxdb-in-querry-field/67002/1 "2022-08-27T11:47:40Z")

</div>

Hi,

i would like to have a query with dynamical variable.

Example that works but it doesnt have dynamical variable. "-5d" is hardcoded.  
 ![](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/0/50c40f2f115bff35f6dbc5abbaaa19fa45975214.png)  
When i set my date in date picker msg.payload goes to my influxdb input.

 ![](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/8/783aa43076e478ffef6a808313646161a1869115.png)  
Something like this?  
 ![](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/3/63103cd786b545c89957a53b3c04ea418b3616ab.png)  
 ![](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/0/50cb9acb7d49166b16137772bbf5f136c2bed2a3.png)  
I got errors:  
 ![](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/7/871d33e5b3af70bdb64cb3b9fe73cd541335a942.png)  
Is this possible?

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [27 August 2022 12:46 UTC](https://discourse.nodered.org/t/node-red-influxdb-in-querry-field/67002/2 "2022-08-27T12:46:12Z")

</div>

Try using a Template node to construct the query. There is a built in example in the node that explains the syntax.

---

<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:** [26 October 2022 12:46 UTC](https://discourse.nodered.org/t/node-red-influxdb-in-querry-field/67002/3 "2022-10-26T12:46:56Z")

</div>

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