# How to refer to a flow context variable in ui\_template?

**URL:** https://discourse.nodered.org/t/how-to-refer-to-a-flow-context-variable-in-ui-template/47485
**Category:** Dashboard
**Created:** [22 June 2021 14:41 UTC](https://discourse.nodered.org/t/how-to-refer-to-a-flow-context-variable-in-ui-template/47485 "2021-06-22T14:41:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![levi](https://avatars.discourse-cdn.com/v4/letter/l/ce73a5/32.png) [@levi](https://discourse.nodered.org/u/levi)
#### Post date: [22 June 2021 14:41 UTC](https://discourse.nodered.org/t/how-to-refer-to-a-flow-context-variable-in-ui-template/47485/1 "2021-06-22T14:41:48Z")

</div>

Hello,

I created a table using ui\_template. I am populating the table with some Objects. Then next to each object I added a button to change the value of an Attribute of the Object assigning it to flow.get("attribute"). But it is not working because I assume there is some specific way I should be referring to the "attribute" var of flow context.

```auto
<td><button type="button" ng-click="object.attribute = flow.get('attribute'); send(msg);">Fill</button></td>

```

If instead of flow.get('attribute') I assign it to a value of my choice, say "att1", it works. So, the only problem is that I am not getting the value of flow.get('attribute').

Node-RED version: v1.3.5  
Node.js version: v14.15.1  
node-red-dashboard v2.29.1  
Windows 10

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [22 June 2021 18:42 UTC](https://discourse.nodered.org/t/how-to-refer-to-a-flow-context-variable-in-ui-template/47485/2 "2021-06-22T18:42:40Z")

</div>

flow.get is a server side thing. So you can pick up that variable when the `send` call fires out of the template node.

---

<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: [22 July 2021 18:43 UTC](https://discourse.nodered.org/t/how-to-refer-to-a-flow-context-variable-in-ui-template/47485/3 "2021-07-22T18:43:38Z")

</div>

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