# \[solved\] Set property value from flow variable using jsonata

**URL:** <https://discourse.nodered.org/t/solved-set-property-value-from-flow-variable-using-jsonata/40064>\
**Category:** General\
**Created:** [30 January 2021 19:03 UTC](https://discourse.nodered.org/t/solved-set-property-value-from-flow-variable-using-jsonata/40064 "2021-01-30T19:03:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielo515](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/danielo515/32/31899_2.png) [@danielo515](https://discourse.nodered.org/u/danielo515)\
**Post date:** [30 January 2021 19:03 UTC](https://discourse.nodered.org/t/solved-set-property-value-from-flow-variable-using-jsonata/40064/1 "2021-01-30T19:03:43Z")

</div>

Hello.  
I'm trying to use the node change to set a property of the payload to a calculation using a flow context variable.  
I don't get any error, but I don't get any value either. Is this not supported or what? Didn't found anything on the docs against this:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/f/5fa3f62f290a32fd4dad3fb66718d4f437b1fb8b.png)

---

<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:** [30 January 2021 19:07 UTC](https://discourse.nodered.org/t/solved-set-property-value-from-flow-variable-using-jsonata/40064/2 "2021-01-30T19:07:35Z")

</div>

Is the flow context set in the same flow, if not use global context. Can not add more as would need some debug info and maybe look at your flow.

---

<div class="post-metadata">

**Author:** ![danielo515](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/danielo515/32/31899_2.png) [@danielo515](https://discourse.nodered.org/u/danielo515)\
**Post date:** [30 January 2021 19:10 UTC](https://discourse.nodered.org/t/solved-set-property-value-from-flow-variable-using-jsonata/40064/3 "2021-01-30T19:10:47Z")

</div>

Sorry.  
This is a subflow that accepts config variables:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/b/9b0d141d2cacd3199250c720f7b1d00b3160a18c.png)

Are those available as flow env variables right?

---

<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:** [30 January 2021 19:14 UTC](https://discourse.nodered.org/t/solved-set-property-value-from-flow-variable-using-jsonata/40064/4 "2021-01-30T19:14:18Z")

</div>

No they are enviroment variables  
Try `$env("wait")`

---

<div class="post-metadata">

**Author:** ![danielo515](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/danielo515/32/31899_2.png) [@danielo515](https://discourse.nodered.org/u/danielo515)\
**Post date:** [30 January 2021 19:14 UTC](https://discourse.nodered.org/t/solved-set-property-value-from-flow-variable-using-jsonata/40064/5 "2021-01-30T19:14:24Z")

</div>

Ok, seems that the env variables are not accessible as flow context variables. My mistake

---

<div class="post-metadata">

**Author:** ![danielo515](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/danielo515/32/31899_2.png) [@danielo515](https://discourse.nodered.org/u/danielo515)\
**Post date:** [30 January 2021 19:16 UTC](https://discourse.nodered.org/t/solved-set-property-value-from-flow-variable-using-jsonata/40064/6 "2021-01-30T19:16:37Z")

</div>

Yep, that was it.  
Thank you

---

<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:** [13 February 2021 19:16 UTC](https://discourse.nodered.org/t/solved-set-property-value-from-flow-variable-using-jsonata/40064/7 "2021-02-13T19:16:41Z")

</div>

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