# Notifications History

**URL:** <https://discourse.nodered.org/t/notifications-history/51414>\
**Category:** General\
**Created:** [22 September 2021 22:49 UTC](https://discourse.nodered.org/t/notifications-history/51414 "2021-09-22T22:49:09Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_iJunior](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/_ijunior/32/48469_2.png) [@\_iJunior](https://discourse.nodered.org/u/_iJunior)\
**Post date:** [22 September 2021 22:49 UTC](https://discourse.nodered.org/t/notifications-history/51414/1 "2021-09-22T22:49:09Z")

</div>

Hello people! I would like to know if it is possible to create some widget on the dashboard to show the history of received notifications, for example the last 5, do you know how I can do this? Or if it's possible at least?

---

<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:** [22 September 2021 23:25 UTC](https://discourse.nodered.org/t/notifications-history/51414/2 "2021-09-22T23:25:41Z")

</div>

> [@\_iJunior](#):
>
> history of received notifications

what notifications? from where?

> [@\_iJunior](#):
>
> Or if it's possible at least?

If you have an array of 5 _things_, you can certainly show them on a dashboard yes.

---

<div class="post-metadata">

**Author:** ![Christian-Me](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/christian-me/32/10774_2.png) [@Christian-Me](https://discourse.nodered.org/u/Christian-Me)\
**Post date:** [23 September 2021 05:45 UTC](https://discourse.nodered.org/t/notifications-history/51414/3 "2021-09-23T05:45:09Z")

</div>

Perhaps something like a log?

> [@Problem with data displayed in UI-Table when switching Tabs](https://discourse.nodered.org/t/problem-with-data-displayed-in-ui-table-when-switching-tabs/48940/7):
>
> So something like a logfile .... This is using a little bit more complex (but universal) subflow I use for all my tables. But you can do it more simple too: A) a function node which gets an array (of lines) from the flow context and pushes the new line at the end B) a second function node triggered by ui-control gets the same context array and send it to ui-table I splittend it up to different nodes to make it easier to understand / debug - The tricky part is to scroll the table if you in…

Here you find a basic example. One post later you find the code to limit the amount of rows to keep.

---

<div class="post-metadata">

**Author:** ![\_iJunior](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/_ijunior/32/48469_2.png) [@\_iJunior](https://discourse.nodered.org/u/_iJunior)\
**Post date:** [23 September 2021 13:42 UTC](https://discourse.nodered.org/t/notifications-history/51414/4 "2021-09-23T13:42:28Z")

</div>

For example, I'm notifying the dashboard when there is a threshold such as temperature exceeded (example), in that I'd like to create a history with these notifications and the time to see when the last failure occurred, understand?

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

---

<div class="post-metadata">

**Author:** ![\_iJunior](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/_ijunior/32/48469_2.png) [@\_iJunior](https://discourse.nodered.org/u/_iJunior)\
**Post date:** [23 September 2021 13:43 UTC](https://discourse.nodered.org/t/notifications-history/51414/5 "2021-09-23T13:43:39Z")

</div>

I thought of sending these notifications to a database with a timestamp and then pulling them to a table

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [23 September 2021 13:54 UTC](https://discourse.nodered.org/t/notifications-history/51414/6 "2021-09-23T13:54:03Z")

</div>

So why not do that? Send the msg to a database node to record it. Else where you can have a flow that triggers however you want and select the rows descending with a ‘Limit’ clause

---

<div class="post-metadata">

**Author:** ![\_iJunior](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/_ijunior/32/48469_2.png) [@\_iJunior](https://discourse.nodered.org/u/_iJunior)\
**Post date:** [23 September 2021 15:38 UTC](https://discourse.nodered.org/t/notifications-history/51414/7 "2021-09-23T15:38:20Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/f/df46106357707c173c9d6fd28087cfdc7f710c03.png)  
I'm trying this right now, but I don't know if I'm going the right way. The data arrives in the database correctly like in the print. But no bottom node is coming out of the database to send to the table.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/8/58d5f9f1b25cac605905f08b38546b9885bca851.png)

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [23 September 2021 15:46 UTC](https://discourse.nodered.org/t/notifications-history/51414/8 "2021-09-23T15:46:01Z")

</div>

1. What database are you using?
2. How are you triggering the select?
3. What are the sql statements you are using for the insert and select?
4. What is the schema for the table?
5. What database node are you using - the full name please node-red-contrib-?????

---

<div class="post-metadata">

**Author:** ![\_iJunior](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/_ijunior/32/48469_2.png) [@\_iJunior](https://discourse.nodered.org/u/_iJunior)\
**Post date:** [23 September 2021 15:55 UTC](https://discourse.nodered.org/t/notifications-history/51414/9 "2021-09-23T15:55:14Z")

</div>

1 - Cloudant  
2 - I didn't understand very well, I'm a bit new in this area, I'm managing to put the data in the database calmly, but I need something to activate the output, is that it?  
3 -

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/9/79136fa58d81cff62a8ee31e1b2ef6fec0c9b5f8.png)  
4 - There will be two columns, one with the text of the last notification and the other is the time, showing when it was displayed in the dashboard  
5 - node-red-contrib-cloudantplus

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [23 September 2021 17:53 UTC](https://discourse.nodered.org/t/notifications-history/51414/10 "2021-09-23T17:53:21Z")

</div>

Cloudant… I was wondering about that. I have no experience with it so I will have to bow out here unless you want to use a sql database.

Is there a particular reason you are using cloutant?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [22 November 2021 17:53 UTC](https://discourse.nodered.org/t/notifications-history/51414/11 "2021-11-22T17:53:34Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
