# Dashboard Template script with msg.payload

**URL:** https://discourse.nodered.org/t/dashboard-template-script-with-msg-payload/9983
**Category:** Dashboard
**Created:** [10 April 2019 12:14 UTC](https://discourse.nodered.org/t/dashboard-template-script-with-msg-payload/9983 "2019-04-10T12:14:30Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![hutje](https://avatars.discourse-cdn.com/v4/letter/h/43a26b/32.png) [@hutje](https://discourse.nodered.org/u/hutje)
#### Post date: [10 April 2019 12:14 UTC](https://discourse.nodered.org/t/dashboard-template-script-with-msg-payload/9983/1 "2019-04-10T12:14:30Z")

</div>

How can I use the objects from msg.payload inside the script-tag?  
I need this information to control the layout...  
Outside the script-tag it is possible, but I need it inside the script

---

<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: [10 April 2019 13:33 UTC](https://discourse.nodered.org/t/dashboard-template-script-with-msg-payload/9983/2 "2019-04-10T13:33:16Z")

</div>

the Info sidebar for the ui\_template node has an example of accessing `msg.payload` from within a script.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [12 April 2019 15:29 UTC](https://discourse.nodered.org/t/dashboard-template-script-with-msg-payload/9983/3 "2019-04-12T15:29:45Z")

</div>

This has some worked examples:

> **[Node-RED Dashboard Template Examples (AngularJS)](https://it.knightnet.org.uk/kb/nr-qa/dashboard-template-examples/)**
>
> Some examples of using AngularJS with the Node-RED Dashboard.
> Not all features of Angular are accessible via the Dashboard.
