# How to build a database connection inside dashboard-template-node

**URL:** https://discourse.nodered.org/t/how-to-build-a-database-connection-inside-dashboard-template-node/68234
**Category:** Dashboard
**Tags:** node-red-dashboard, database
**Created:** [26 September 2022 11:53 UTC](https://discourse.nodered.org/t/how-to-build-a-database-connection-inside-dashboard-template-node/68234 "2022-09-26T11:53:37Z")
**Posts on this page:** 1
**Showing post:** 23

<div class="post-metadata">

### Author: ![JustinB](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/justinb/32/68068_2.png) [@JustinB](https://discourse.nodered.org/u/JustinB)
#### Post date: [28 September 2022 14:03 UTC](https://discourse.nodered.org/t/how-to-build-a-database-connection-inside-dashboard-template-node/68234/23 "2022-09-28T14:03:11Z")

</div>

It's finally working. Thanks for all your effort! (And very sorry for the little dispute)

A little summary for everybody who is interested:

The flow

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/1/f1589d94eb2c0e830846884f8348bc2569cdebd2.png)

Every node from left to right (except database):

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/7/a7895c68a498c3cc810a9243e23ee5ffb71e018f.png)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/0/f076f1efb1fb468d66272d725822fb4653eac5c6.png)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/f/2f4014b16e94dcbb9f84fd3a4d37270c0e3810f3.png)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/4/e4e97d1a9240b2f12afea5aa4f86811c76b2ff6d.png)

And the code of the table(inside template node):

```auto
<script type="text/javascript" src="/tabulator-tables/dist/js/tabulator.min.js"></script>
<link rel="stylesheet" href="/tabulator-tables/dist/css/tabulator_semanticui.min.css" />
<div id="table-messungen"></div>
<script>
    var tableM = new Tabulator("#table-messungen", {
        height:"1000px",
        placeholder:"Keine Daten verfügbar!",
        layout:"fitColumns",
        pagination:true,
        paginationMode:"remote",
        //groupBy:"Zeitstempel",
        //groupToggleElement:"header",
        ajaxURL:"http://10.207.48.36:1880/fetchmessungen",
        paginationSize:1000,
    /*
        initialSort:[
            {column:"Zeitstempel", dir:"asc"},
        ],
    */
        columns:[
            {title:"Register", field:"Register", width:150},
            {title:"Druck (Pascal)", field:"Druck"},
            {title:"Zeitstempel", field:"Zeitstempel"},
        ],
       
    });
</script>

```

---

_[View the full topic](https://discourse.nodered.org/t/how-to-build-a-database-connection-inside-dashboard-template-node/68234)._
