# Can a standard function access the name its been given?

**URL:** https://discourse.nodered.org/t/can-a-standard-function-access-the-name-its-been-given/15639
**Category:** General
**Created:** [17 September 2019 20:40 UTC](https://discourse.nodered.org/t/can-a-standard-function-access-the-name-its-been-given/15639 "2019-09-17T20:40:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)
#### Post date: [17 September 2019 20:40 UTC](https://discourse.nodered.org/t/can-a-standard-function-access-the-name-its-been-given/15639/1 "2019-09-17T20:40:17Z")

</div>

e.g can I access the name as a variable inside the function?

---

<div class="post-metadata">

### Author: ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)
#### Post date: [17 September 2019 20:43 UTC](https://discourse.nodered.org/t/can-a-standard-function-access-the-name-its-been-given/15639/2 "2019-09-17T20:43:54Z")

</div>

yes you can actually, it's listed on the "writing functions" doc page:  
`node.name`  
[https://nodered.org/docs/user-guide/writing-functions#node](https://nodered.org/docs/user-guide/writing-functions#node)

---

<div class="post-metadata">

### Author: ![shrickus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/shrickus/32/517_2.png) [@shrickus](https://discourse.nodered.org/u/shrickus)
#### Post date: [17 September 2019 21:56 UTC](https://discourse.nodered.org/t/can-a-standard-function-access-the-name-its-been-given/15639/3 "2019-09-17T21:56:31Z")

</div>

Now, if only there was a built-in property for `node.outputs` (how many output ports are defined)...  
or better yet, an array of output definitions (with labels and such).
