# Flow and global from function not in default incited into permanent file

**URL:** <https://discourse.nodered.org/t/flow-and-global-from-function-not-in-default-incited-into-permanent-file/67993>\
**Category:** General\
**Created:** [20 September 2022 19:48 UTC](https://discourse.nodered.org/t/flow-and-global-from-function-not-in-default-incited-into-permanent-file/67993 "2022-09-20T19:48:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![edstobi](https://avatars.discourse-cdn.com/v4/letter/e/aca169/32.png) [@edstobi](https://discourse.nodered.org/u/edstobi)\
**Post date:** [20 September 2022 19:48 UTC](https://discourse.nodered.org/t/flow-and-global-from-function-not-in-default-incited-into-permanent-file/67993/1 "2022-09-20T19:48:25Z")

</div>

hello  
sorry to ask, but I may not have entered the right words in the search box when searching the forum.  
I have set the variables so that I have default in memory and can also write to a file.  
In change and other nodes I can decide this via a pull down where I would like to have this stored.  
But I have not found a way how to do this out of a function. Is there a possibility of influencing this or does the variable always go out and in into default?

I have a temperature in the default (memory) at one point and in the file at another. These are different ☹ because one is written to the file via change wehr I chose file but the function writes to default and reads from default memory. This confuses my data somewhat

---

<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:** [20 September 2022 20:43 UTC](https://discourse.nodered.org/t/flow-and-global-from-function-not-in-default-incited-into-permanent-file/67993/2 "2022-09-20T20:43:27Z")

</div>

It is describe [here](https://nodered.org/docs/user-guide/writing-functions#multiple-context-stores) in docs.

---

<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:** [19 November 2022 20:44 UTC](https://discourse.nodered.org/t/flow-and-global-from-function-not-in-default-incited-into-permanent-file/67993/3 "2022-11-19T20:44:24Z")

</div>

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