The Tree\Folder filters provides operators the ability to choose which Folders within Mailboxes or Public Folders will be displayed (Included/Excluded) and acted upon during search, restore and export actions.
The best way to determine if you should use the Exclude or Include option really depends on which is less work/complicated. For example within this article its more advantageous to filter/hide all folders except for the "Recoverable Items" by using the "Include Only" option since only folders that match the Inclusion filters will be displayed, while all others will be excluded.
- As a prerequisite ensure you have read the Tree\Folder Filters Solution Article
- This article shows how to ONLY include/show the desired folders within the tree
Our goals with the variuous methods within the example have several goals;
- PRIMARY GOAL: To ONLY display the Recoverable Items folders within each mailbox
- SECONDARY GOAL: Show the various methods one can use when creating a Tree\Folder filter. Spoiler alert not all the methods shown below will achieve the "Primary Goal" nevertheless each method shown here will help you understand the strengths and weaknesses of each method so that you will be able to determine the best method to achieve your goals
- TERTIARY GOAL: Demonstrate how important it is to test your filters before executing an action.
NOTE: Filters are really the same as searches, except that searches examine from the start to the bottom of the selected object, i.e. one or more databases, mailboxes, folders etc. Filters allow you enter the desired criteria just like you would a search, however after applying a filter you can visually see the results on a folder by folder basis vs having to wait until a search is complete to examine the results. Actually after defining, saving and validating a filter you could use it to execute a search across one or more databases/mailboxes.
Method 1: Simply enter the Folder Name to be Included
Seems simple enough, just enter the folder name you want to include so that all others will be excluded, right? OK lets find out.
1. From the Offline or Production pane click the Tree Filter drop down and select <New Filter...> and the Tree\Folder - New Filter dialog will appear
2. As shown in the above image, ensure the "Include Only These Mailboxes\Folders" option is selected
3. Double Click the ellipse "..." directly under the Rule label and enter Recoverable Items
TIP: This article only requires a single entry, however if needed additional entries can be added to meet your needs. For example if we wanted to include the "Inbox" along with the "Recoverable Items" folder we could add a second entry.
4. Click the Save drop down and select the "Save As" option and the filter name dialog appears as shown here
5. Enter a meaningful name and click OK to save the filter
6. When a filter is applied the background will change to an off-white/yellowish color which is a visual indicator that a filter is applied
- You can apply defined folder/tree level filters by selecting the available items from drop down list to the right the desired tree, i.e. the Offline or Production pane area.
- For this example we are applying the filter to the Offline Pane
- After applying the filter the background changes to an off-white/yellowish color as shown here
- Mount/Connect to a database and expand a mailbox or folder to see the effects of the filter as shown here
NOTE: As you can see our filter did NOT achieve the Primary Goal which was to "ONLY display the Recoverable Items folders within each mailbox". Failing use the quotes when entering the folder name has the net effect of telling the filter to show ALL folders that have the words "Recoverable" OR "Items" included with the folder name
Method 2: Wrapping Multi-Word Folder Names with quotes " "
As we saw in method one, failing to wrap multi-word folders with quotes had unexpected results and failed to meet the Primary Goal to "ONLY display the Recoverable Items folders within each mailbox". Within this example we will modify the existing filter to wrap the multi-word the folder name in quotes and then check our results
OK so lets modify the filter by taking the following actions;
1. Once again clicking the Tree Filter drop down and select <New Filter...>
2. Click Load to display the available filters and select the filter you want to load
3. Double click on the entry to modify it to include double quotes around the folder name i.e. "Recoverable Items" so it looks like the image below
4. Save the changes, the filter is updated and the results should now look something like the image below
NOTE: While the above filter method is close to achieving the primary goal, its important to point out that this filter in its current form will show ANY top level folder that includes the phrase of "Recoverable Items" and our Primary Goal was to "ONLY display the Recoverable Items folders within each mailbox"
- For example if I apply this same filter to my production pane it looks like this
- Notice that when using this filter it shows the "Recoverable Items" folder and the "Restored - Recoverable Items 3/28/2017...." folder.
NOTE: With this method we almost met the Primary Goal which was to "ONLY display the Recoverable Items folders within each mailbox". Using the quotes when entering the multi-word folder name allowed us to show ANY folder names that included the phrase of "Recoverable Items" within the folder name, however in the it missed the mark of our primary goal
Method 3: Using Regular Expressions
Since we want to be very exact we are going to enhance this filter by using a Regular Expression aka RegEx. This is a very simple yet effective example of how RegEx can help you achieve your goals.
OK so to achieve our primary goal to ONLY show the "Recoverable Items" folder do the following;
1. Click the Tree Filter drop down and select <New Filter...>
2. Click Load to display the available filters and select the desired filter
3. Once loaded double click the entry you want to edit and take the following actions
4. REMOVE the double quotes "" from Recoverable Items (If we dont remove them RegEx will look for a folder with the ")
5. Click on "Is RegEx" and the filter should now look like the image below
6. Click on the ellipse button as shown within the above image
7. The "Regular Expression Builder" dialog appears and the phrase "Recoverable Items" should be highlighted as shown here
8. As shown below select Anchors> Beginning of line.
9. Click to position the cursor at the end of the phrase and this time select Anchors> End of line
This puts a "^" before the phrase and a "$" after the phrase as shown below which in short is saying the folder MUST begin and end exactly as its entered
10. Click OK and the Filter should appear as it does below
11. Click OK to save the filter, the update is automatically applied
12. As you can see we have now met our Primary Goal to "ONLY display the Recoverable Items folders within each mailbox
SUPPORT: If you experience issues, have questions or need assistance after following these instructions please Open a New Support Ticket or if you already have a ticket open reply with details and we will be happy to assist.