# Beginner questions on IF expressions and wildcard usage in function node

**URL:** <https://discourse.nodered.org/t/beginner-questions-on-if-expressions-and-wildcard-usage-in-function-node/80999>\
**Category:** General\
**Created:** [3 September 2023 11:43 UTC](https://discourse.nodered.org/t/beginner-questions-on-if-expressions-and-wildcard-usage-in-function-node/80999 "2023-09-03T11:43:38Z")\
**Posts on this page:** 1\
**Showing post:** 56

<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:** [5 September 2023 15:16 UTC](https://discourse.nodered.org/t/beginner-questions-on-if-expressions-and-wildcard-usage-in-function-node/80999/56 "2023-09-05T15:16:50Z")

</div>

> [@AleXSR700](#):
>
> Is there any other node than a function node even intended for this?

Change node can set them. other nodes can use them.

> [@AleXSR700](#):
>
> Does the variable have to be part of any path

Not certain what you mean.

> [@AleXSR700](#):
>
> or can it just be a standalone node where I define my variables?

If you define a flow context variable, it is available to every node on that page/tab  
If you define a global context variable, it is available to every node on every page/tab

* * *

NOTE: Be careful with context. It is tempting to use it everywhere but in truth, it can bite when you have quick successive messages (remember, node-red is async). Where possible, try to put the data to process into the msg, pass it along to the next node for further processing etc. This is akin to PURE programming. A useful piece to export is the [link-call node](https://discourse.nodered.org/t/howto-define-and-use-global-utillity-function-in-v3-x-and-higher/81054/2). By its very nature, it helps you minimise code duplication and promotes PURE programming.

---

_[View the full topic](https://discourse.nodered.org/t/beginner-questions-on-if-expressions-and-wildcard-usage-in-function-node/80999)._
