Tips & Tricks - A useful bug in Request Filters

Tips & Tricks - A useful bug in Request Filters

Normally, you can only create a request filter with various Filter Sets that are either all AND or all OR. You can't mix and match AND/OR conditions. When you click the repective, "Match ALL of the following (AND)" or the "Match ALL of the following (OR)" radio buttons, it applies the AND/OR condition to ALL filter sets. It would be prefered that the toggling of AND/OR was possible on a per-line basis of the filter sets configured.

I have found a bug which allows you to do this. Assume you want to define the following filter:

---
SupportRep is "Tom", "Mary"
OR Group is "PC Support", "Helpdesk"
AND RequestStatus is "Open"
---

With the filter options as they exist today, you can't create this filter set because it combines OR and AND statements. Use this bug to accomplish this task.

1. Create a new filter
2. Make sure the "Match ALL of the following (OR)" option is set as you add filter sets.
3. Add the (SupportRep is "Tom", "Mary") set.
4. Add the (Group is "PC Support", "Helpdesk") set.

- Note: Because you set the "OR" option in #2, the OR operand is used.

5. SAVE this filter and return to the custom filter list.
6. AFTER saving the filter, go back and EDIT the filter again.

- Note: The "AND" operator is selected by default each time, which is the bug we are going to be using here.

7. Add the (RequestStatus is "Open") set.

When you add this 3rd set, it adds it as an AND operator instead of an OR (as the others were). If you (re)toggle the AND/OR option on the filter, it will reset all filter sets to the same and you'll have to start over. But, if you want to mix and match AND/OR filter sets, just keep in mind that every time you edit a filter, the application reverts back to "AND" by default and any new filter sets you add will have the AND operator, even if the first ones were added with OR.

Because of this bug, you can combine OR/AND operators, as long as you can do so in that order. Because it defaults to "AND", you can't actually start with AND filter sets and then switch to OR. You have to start with OR.

Hopefully, the developers will receive my request to add AND/OR options PER-FILTER SET in the future, to allow for more complex filtering options. I don't know what I would do in other applications that didn't allow me to configure complex filters. Below is a SolarWinds Orion Network Performance Monitor example that if I couldn't combine AND (&&) and OR (||) operators, I'd be completely hosed.

Status != DOWN OR Status !=UnManaged AND DisplayGrouping != 'WAN Sites' AND DisplayGrouping != 'Other' AND not Caption Like '%ISDN Backup%' AND DeviceType != 'VPN - Remote Access'

Enjoy this bug. Hopefully, they won't fix it before implementing the ability to define complex filters.

































                  New to ADSelfService Plus?