# Custom node with values from global

**URL:** <https://discourse.nodered.org/t/custom-node-with-values-from-global/44977>\
**Category:** Developing Nodes\
**Created:** [30 April 2021 09:49 UTC](https://discourse.nodered.org/t/custom-node-with-values-from-global/44977 "2021-04-30T09:49:39Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [30 April 2021 13:19 UTC](https://discourse.nodered.org/t/custom-node-with-values-from-global/44977/12 "2021-04-30T13:19:14Z")

</div>

> [@jake123](#):
>
> idk why it formats like this

Because you have to use ``` not just ` when marking code blocks.

I don't see the code you asked "Shouldn't this be fine" about anywhere in there.

I do see you call `$("#node-input-server").val(this.server);` - but you are using `this.server`. That will not work because at that point in your code, `this` is _not_ your node object. You missed the bit I said about adding `var node = this` at the top of your oneditprepare and using `node.server` instead.

---

_[View the full topic](https://discourse.nodered.org/t/custom-node-with-values-from-global/44977)._
