# Can't hide Dashboard Group

**URL:** https://discourse.nodered.org/t/cant-hide-dashboard-group/6015
**Category:** Dashboard
**Created:** [21 December 2018 08:38 UTC](https://discourse.nodered.org/t/cant-hide-dashboard-group/6015 "2018-12-21T08:38:54Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Surrbradl08](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@Surrbradl08](https://discourse.nodered.org/u/Surrbradl08)
#### Post date: [21 December 2018 08:38 UTC](https://discourse.nodered.org/t/cant-hide-dashboard-group/6015/1 "2018-12-21T08:38:54Z")

</div>

Hi!  
I'm struggling with hiding a group in the node-red dashboard. I want to hide the **Finish Cocktail** group if there are less than 2 ingredients in the table. I debugged the node, it sends the command to hide, but nothing happens. This is the code that decides if the group should be hidden or shown. It works but the group is always shown.

Any ideas?

```javascript
var ingcnt = 0; // ingredient count
var nc = global.get("nc"); // cocktail object
if(nc == null)msg.payload = {group:{hide:["Finish_Cocktail"]}}; // hide group if the object doesn't exist
else
{
    for(var i = 0;i<8;i++) // count ingredients
    {
        if(nc.id[i] !='')ingcnt++;
    }
    if(ingcnt > 1) // show Finish Cocktail group if there are at least 2 ingredients
    {
        msg.payload = {group:{show:["Finish_Cocktail"]}};
    }
    else 
    {
         msg.payload = {group:{hide:["Finish_Cocktail"]}}; // if there are less then 2 ingredients hide the group
    }
}
return msg;

```

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/0/052232aa7cf1dd7debb73b66fc18e570dfd6f897.png)

---

<div class="post-metadata">

### Author: ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)
#### Post date: [21 December 2018 08:50 UTC](https://discourse.nodered.org/t/cant-hide-dashboard-group/6015/2 "2018-12-21T08:50:30Z")

</div>

Bizarrely you are the second person to ask a question about Node-RED and cocktail ingredients recently. Is this coursework being set somewhere, if so where?

---

<div class="post-metadata">

### Author: ![Surrbradl08](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@Surrbradl08](https://discourse.nodered.org/u/Surrbradl08)
#### Post date: [21 December 2018 08:52 UTC](https://discourse.nodered.org/t/cant-hide-dashboard-group/6015/3 "2018-12-21T08:52:31Z")

</div>

Nope, just a school project. 😃

Could you provide me with a link to that topic please.

---

<div class="post-metadata">

### Author: ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)
#### Post date: [21 December 2018 09:14 UTC](https://discourse.nodered.org/t/cant-hide-dashboard-group/6015/4 "2018-12-21T09:14:36Z")

</div>

Use the search and search for cocktail…

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [21 December 2018 10:14 UTC](https://discourse.nodered.org/t/cant-hide-dashboard-group/6015/5 "2018-12-21T10:14:53Z")

</div>

As per the README

> Groups can be hidden and made visible via a msg like {group:{hide:["tab\_name\_group\_name\_with\_underscores"],show:["tab\_name\_another\_group"],focus:true}}

IE - they need the tab name as well as the group name... so it would be something like "Cocktail\_Creation\_Finish\_Cocktail" - I'm guessing but you get the idea.
