# Organizing stacks

Depending on the complexity of your infrastructure, the size of your team, your particular needs and your preferred way of working you may end up managing a lot of stacks. This obviously makes it harder to quickly find what you're looking for. As practitioners ourselves, we're providing you a few tools to make this process more manageable - from the basic [query-based searching](#query-based-searching-and-filtering) to [filtering by status](#label-based-folders) and the coolest of all, [label-based folders](#label-based-folders).

## Query-based searching and filtering

Historically the first tool we offered was the search bar:

![](https://3862190545-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LshwwDZmA4HXN0k9e8O%2Fuploads%2F5ly1SRjaUdnh21VDBmlD%2FScreen%20Shot%202022-06-29%20at%203.06.42%20PM.png?alt=media\&token=35f5a41c-0ad9-4400-a72b-d4cc901f59ac)

The search bar allows you to search and filter by the following stack properties:

* name;
* ID (slug);
* any of its [labels](../stack-settings#labels);

Note how the search phrase is highlighted, and irrelevant stacks are filtered out:

![](https://3862190545-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LshwwDZmA4HXN0k9e8O%2Fuploads%2FJGcfea7jmnoZc0TiwkCw%2FScreen%20Shot%202022-06-29%20at%203.07.29%20PM.png?alt=media\&token=cf6c8b2e-eed5-4223-ad2b-a340992b9228)

## Filtering by status

Filtering stacks by status is a very useful mechanism for identifying action items like plans pending confirmation ([unconfirmed](../../run/tracked#unconfirmed) state) or [failed](../../run#failed) jobs that require fixing. For that, use the _Filter stacks by status_ section on the sidebar to the left. If you click on any of the statuses, the list of stacks will be filtered to only include stacks with a given status:

![](https://3862190545-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LshwwDZmA4HXN0k9e8O%2Fuploads%2FkGDyrDa0evgC1HlOXAhT%2FScreen%20Shot%202022-06-29%20at%203.09.29%20PM.png?alt=media\&token=b554cec6-f477-4032-9afe-ffd8233b75bf)

Note that if no stacks in the account have a particular status at the moment, that status is missing from the list.

## Label-based folders

Probably the most useful way of grouping stacks is by attaching folder labels to them. You can read more about [labels](../stack-settings#labels) here, including how to set them, and folder labels are just regular labels, prefixed with `folder:`. In order to make it more obvious in the GUI and save some screen real estate, we replace the `folder:` prefix by the folder icon...

![](https://3862190545-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LshwwDZmA4HXN0k9e8O%2Fuploads%2FE1oh5yNjC0XzRBuDMleE%2FScreen%20Shot%202022-06-29%20at%205.21.20%20PM.png?alt=media\&token=b011dcc6-5fec-4101-a14f-cfdd62efdf43)

...but once you start editing labels, the magic is gone:

![](https://3862190545-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LshwwDZmA4HXN0k9e8O%2Fuploads%2FS4hubVs2qLccwrIHT8kV%2FScreen%20Shot%202022-06-29%20at%205.22.51%20PM.png?alt=media\&token=bbf08aca-9c19-4a29-b7ad-52dfae8f60ef)

For every folder label, a sidebar section is included in the _Folders_ menu, allowing you to search by that label. The number to the right hand side indicates that number of stacks with that label:

![](https://3862190545-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LshwwDZmA4HXN0k9e8O%2Fuploads%2FmwUUpvmXTW9eNyWHfi6C%2FScreen%20Shot%202022-06-29%20at%205.24.06%20PM.png?alt=media\&token=9abc04f2-e166-4359-a223-58bd8d542d0e)

### Nesting and multiple folder labels

Perhaps worth mentioning is the fact that folder labels can be nested, allowing you to create either hierarchies, or arbitrary classifications of your stacks.

Also, a single stack can have any number of folder labels set, in which case it belongs to all the collections. In that, folder labels are like labels in Gmail rather than directories in your filesystem.
