# Dashboard2 close notification

**URL:** <https://discourse.nodered.org/t/dashboard2-close-notification/92873>\
**Category:** General\
**Tags:** dashboard-2\
**Created:** [2 November 2024 19:26 UTC](https://discourse.nodered.org/t/dashboard2-close-notification/92873 "2024-11-02T19:26:50Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![GIGS1975](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gigs1975/32/47306_2.png) [@GIGS1975](https://discourse.nodered.org/u/GIGS1975)\
**Post date:** [2 November 2024 19:26 UTC](https://discourse.nodered.org/t/dashboard2-close-notification/92873/1 "2024-11-02T19:26:50Z")

</div>

Hello there,  
Anyone any clue, how to close a notification in Dashboard2?  
In the msg.update\_ui there is only one command that sounds close to the taskm but it doesnt work. It is the "show" property that i tried to set to false, but this did not help.  
How can i close the notification upon some event?  
I treid to send null payload, false payload nothing helped.

---

<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:** [2 November 2024 20:15 UTC](https://discourse.nodered.org/t/dashboard2-close-notification/92873/2 "2024-11-02T20:15:25Z")

</div>

> [@GIGS1975](#):
>
> msg.update\_ui

You mean msg.ui\_update right?

Have you tried sending `msg.ui_update.show` set to `false`

---

<div class="post-metadata">

**Author:** ![GIGS1975](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gigs1975/32/47306_2.png) [@GIGS1975](https://discourse.nodered.org/u/GIGS1975)\
**Post date:** [2 November 2024 20:23 UTC](https://discourse.nodered.org/t/dashboard2-close-notification/92873/3 "2024-11-02T20:23:11Z")

</div>

Yes tried, tried both enabled, and show..

```auto
msg = {
        "ui_update": {
            "show":false,
        },
     "enabled":false

    };
return msg;

```

---

<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:** [2 November 2024 20:27 UTC](https://discourse.nodered.org/t/dashboard2-close-notification/92873/4 "2024-11-02T20:27:48Z")

</div>

What did you send that to? Into the ui-notification node?

Out of interest, could you try sending `true` to `ui_update.close`

---

<div class="post-metadata">

**Author:** ![GIGS1975](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gigs1975/32/47306_2.png) [@GIGS1975](https://discourse.nodered.org/u/GIGS1975)\
**Post date:** [2 November 2024 20:35 UTC](https://discourse.nodered.org/t/dashboard2-close-notification/92873/5 "2024-11-02T20:35:27Z")

</div>

will try, and come back to you. And btwm yesm i am sending this into the ui\_notification node.

---

<div class="post-metadata">

**Author:** ![GIGS1975](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gigs1975/32/47306_2.png) [@GIGS1975](https://discourse.nodered.org/u/GIGS1975)\
**Post date:** [2 November 2024 20:38 UTC](https://discourse.nodered.org/t/dashboard2-close-notification/92873/6 "2024-11-02T20:38:37Z")

</div>

> [@Steve-Mcl](#):
>
> ui\_update.close

did not work

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [2 November 2024 21:45 UTC](https://discourse.nodered.org/t/dashboard2-close-notification/92873/7 "2024-11-02T21:45:37Z")

</div>

Can you export and post a very simple flow showing the problem please so we can try it? Just an inject, the ui\_notification and nodes to make it appear.

---

<div class="post-metadata">

**Author:** ![GIGS1975](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gigs1975/32/47306_2.png) [@GIGS1975](https://discourse.nodered.org/u/GIGS1975)\
**Post date:** [2 November 2024 22:00 UTC](https://discourse.nodered.org/t/dashboard2-close-notification/92873/8 "2024-11-02T22:00:11Z")

</div>

Sure 1 sec

---

<div class="post-metadata">

**Author:** ![GIGS1975](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gigs1975/32/47306_2.png) [@GIGS1975](https://discourse.nodered.org/u/GIGS1975)\
**Post date:** [2 November 2024 22:05 UTC](https://discourse.nodered.org/t/dashboard2-close-notification/92873/9 "2024-11-02T22:05:08Z")

</div>

> [@Steve-Mcl](#):
>
> ui\_update.close

[flows.json](https://discourse.nodered.org/uploads/short-url/uaO8kAeSGT3BE7SYYszxyapRKvw.json) (3.1 KB)

---

<div class="post-metadata">

**Author:** ![GIGS1975](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gigs1975/32/47306_2.png) [@GIGS1975](https://discourse.nodered.org/u/GIGS1975)\
**Post date:** [2 November 2024 22:25 UTC](https://discourse.nodered.org/t/dashboard2-close-notification/92873/10 "2024-11-02T22:25:00Z")

</div>

[flows.json](https://discourse.nodered.org/uploads/short-url/uaO8kAeSGT3BE7SYYszxyapRKvw.json) (3.1 KB)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [3 November 2024 10:12 UTC](https://discourse.nodered.org/t/dashboard2-close-notification/92873/11 "2024-11-03T10:12:00Z")

</div>

`show: false` is not working for me either. I have submitted an issue

> <https://github.com/FlowFuse/node-red-dashboard/issues/1437>
>
> \### Current Behavior
> 
> If a Notification node is send a message containing \`{ui…\_update: {show: false}}\` it is not hidden
> 
> \### Expected Behavior
> 
> It should be hidden
> 
> \### Steps To Reproduce
> 
> Import this flow, click the Show inject to popup the notification, then the Hide inject, which should hide it.
> 
> \`\`\`
> \[{"id":"285d16e35a26ee0f","type":"ui-notification","z":"bdd7be38.d3b55","ui":"ID-BASE-1","position":"center center","colorDefault":true,"color":"#000000","displayTime":"","showCountdown":false,"outputs":1,"allowDismiss":true,"dismissText":"Ok","allowConfirm":false,"confirmText":"Confirm","raw":false,"className":"","name":"","x":680,"y":3720,"wires":\[\[\]\]},{"id":"f63a82911caf30c1","type":"inject","z":"bdd7be38.d3b55","name":"Show","props":\[{"p":"payload"},{"p":"topic","vt":"str"}\],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":270,"y":3720,"wires":\[\["2bd5f132ebc3ee3e"\]\]},{"id":"2bd5f132ebc3ee3e","type":"function","z":"bdd7be38.d3b55","name":"hello","func":"msg = {\\n payload:\\"hello\\"\\n\\n};\\nreturn msg;\\n\\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":\[\],"x":430,"y":3720,"wires":\[\["71ddc274ab3e03cf"\]\]},{"id":"c3c401e4d567c336","type":"function","z":"bdd7be38.d3b55","name":"show: false","func":"msg = {\\n \\"ui\_update\\": {\\n \\"show\\": false,\\n }\\n \\n\\n};\\nreturn msg;\\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":\[\],"x":450,"y":3780,"wires":\[\["71ddc274ab3e03cf"\]\]},{"id":"2934f84536f6fad7","type":"inject","z":"bdd7be38.d3b55","name":"hide","props":\[{"p":"payload"},{"p":"topic","vt":"str"}\],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":270,"y":3780,"wires":\[\["c3c401e4d567c336"\]\]},{"id":"a09cb12b7b1087c6","type":"debug","z":"bdd7be38.d3b55","name":"debug 87","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":680,"y":3800,"wires":\[\]},{"id":"71ddc274ab3e03cf","type":"junction","z":"bdd7be38.d3b55","x":560,"y":3720,"wires":\[\["285d16e35a26ee0f","a09cb12b7b1087c6"\]\]},{"id":"ID-BASE-1","type":"ui-base","name":"Dashboard","path":"/dashboard","includeClientData":true,"acceptsClientConfig":\["ui-control","ui-notification","ui-gauge-classic"\],"showPageTitle":true,"titleBarStyle":"default"}\]
> \`\`\`
> 
> \### Environment
> 
> \- Dashboard version: 1.18.1
> \- Node-RED version: 4.0.5
> \- Node.js version: 20.5.1
> \- npm version:
> \- Platform/OS: Ubuntu
> \- Browser: Edge
> 
> 
> \### Have you provided an initial effort estimate for this issue?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [3 November 2024 11:17 UTC](https://discourse.nodered.org/t/dashboard2-close-notification/92873/12 "2024-11-03T11:17:39Z")

</div>

By the way, when posting flows please use the preferred method described in [How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506)

Thanks.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [4 November 2024 16:08 UTC](https://discourse.nodered.org/t/dashboard2-close-notification/92873/13 "2024-11-04T16:08:11Z")

</div>

@GIGS1975, in case you have not been following the issue, it appears this is a documentation error and it should say that `msg.show` can be used to show/hide the notification, not `msg.ui_update.show`.

---

<div class="post-metadata">

**Author:** ![GIGS1975](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gigs1975/32/47306_2.png) [@GIGS1975](https://discourse.nodered.org/u/GIGS1975)\
**Post date:** [4 November 2024 19:34 UTC](https://discourse.nodered.org/t/dashboard2-close-notification/92873/14 "2024-11-04T19:34:10Z")

</div>

1. Where did I incorrectly posted my code?
2. Does that mean that, msg.show / msg.hide is the way to go?  
Thank you

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [4 November 2024 20:53 UTC](https://discourse.nodered.org/t/dashboard2-close-notification/92873/15 "2024-11-04T20:53:58Z")

</div>

> [@GIGS1975](#):
>
> Where did I incorrectly posted my code?

You posted it in posts #9 and #10 as an attachment rather than the preferred inline method described in the[link I posted.](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506). The Advantage of that method is that a reader can just click the copy button at the right hand corner of the inlined code rather than having to download it, open it and copy it.

> [@GIGS1975](#):
>
> Does that mean that, msg.show / msg.hide is the way to go?

No, `msg.show` should be `true` or `false`. It is as you had it but `msg.show` instead of `msg.ui_update.show`.

---

<div class="post-metadata">

**Author:** ![GIGS1975](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gigs1975/32/47306_2.png) [@GIGS1975](https://discourse.nodered.org/u/GIGS1975)\
**Post date:** [5 November 2024 08:15 UTC](https://discourse.nodered.org/t/dashboard2-close-notification/92873/16 "2024-11-05T08:15:10Z")

</div>

Okay, thanks

---

<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:** [19 November 2024 08:15 UTC](https://discourse.nodered.org/t/dashboard2-close-notification/92873/17 "2024-11-19T08:15:11Z")

</div>

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