# Python function return variable

**URL:** https://discourse.nodered.org/t/python-function-return-variable/73928
**Category:** General
**Tags:** python
**Created:** [19 January 2023 17:29 UTC](https://discourse.nodered.org/t/python-function-return-variable/73928 "2023-01-19T17:29:06Z")
**Posts on this page:** 5
**Page:** 2

<div class="post-metadata">

### Author: ![superlogan72](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/superlogan72/32/74680_2.png) [@superlogan72](https://discourse.nodered.org/u/superlogan72)
#### Post date: [27 January 2023 12:13 UTC](https://discourse.nodered.org/t/python-function-return-variable/73928/21 "2023-01-27T12:13:46Z")

</div>

Many thanks to all for the help:  
Just for finish my test i would like to display the value in a dasboard ui  
so i have done:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/7/c76c49816ef14f7ab2c03f87cb9fc66068dc362c.png)

the problem is that in the ui i get  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/d/5dfcdb612e2746d328e6b567d1c551384601650f.png)  
How i can get the value that i see in the debug??  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/f/8f642e84ca30671fe31b99d8488bedb7ece88021.png)

that came from the node.send(msg) from the python script  
Thanks

---

<div class="post-metadata">

### Author: ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)
#### Post date: [27 January 2023 12:30 UTC](https://discourse.nodered.org/t/python-function-return-variable/73928/22 "2023-01-27T12:30:09Z")

</div>

In the text node change value format to {{msg.payload.my\_counter}}

---

<div class="post-metadata">

### Author: ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)
#### Post date: [27 January 2023 14:26 UTC](https://discourse.nodered.org/t/python-function-return-variable/73928/23 "2023-01-27T14:26:18Z")

</div>

as described in the node documentation...

---

<div class="post-metadata">

### Author: ![superlogan72](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/superlogan72/32/74680_2.png) [@superlogan72](https://discourse.nodered.org/u/superlogan72)
#### Post date: [27 January 2023 16:16 UTC](https://discourse.nodered.org/t/python-function-return-variable/73928/24 "2023-01-27T16:16:17Z")

</div>

> [@Sean-McG](#):
>
> In the text node change value format to

Sorry guys i use the wrong object i have used the text input instead of the sample text  
Thanks

---

<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: [28 March 2023 16:16 UTC](https://discourse.nodered.org/t/python-function-return-variable/73928/25 "2023-03-28T16:16:38Z")

</div>

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

[Previous page](https://discourse.nodered.org/t/python-function-return-variable/73928.md?page=1)
