Customize reports with multiple filters
2 minute read
When creating or editing a report, you can customize filter conditions by adding multiple filters. You can add as many filters as you need.
Adding multiple filters with the same column identifier creates an “or” condition. This means a row is included in the report if the value of the filtered column meets any of the filter criteria.
Note
You can only create an “or” condition for columns that support thein or contains filter operators. Other filter operators require the value of the column to be a specific date or within a date range.Adding multiple filters with different column identifiers creates an “and” condition. This means a row is only included in the report if the value in each filtered column meets all of the filter criteria.
Examples
Create an “or” condition
This filters array creates a report that includes rows for any orders where the value of the common name (common_name) column:
- Is an exact match for
example.comOR - Is an exact match for
example.netOR - Contains the string
digicertOR - Contains the string
security
{
…
"report_metadata": {
"report_type": "orders",
"columns": […],
"filters":[
{
"filter_identifier":"in",
"column_identifier":"common_name",
"values": [
"example.com",
"example.net"
]
},
{
"filter_identifier":"contains",
"column_identifier":"common_name",
"values":[
"digicert",
"security"
]
}
],
…
}
…
}
Create an “and” condition
This filters array creates a report that includes rows for any orders where:
- The value of the common name (
common_name) column containsexampleAND - The value of the product name (
product_name) column isSecure Site Pro SSL
{
…
"report_metadata": {
"report_type": "orders",
"columns": […],
"filters":[
{
"filter_identifier":"contains",
"column_identifier":"common_name",
"values": [
"example.com"
]
},
{
"filter_identifier":"in",
"column_identifier":"product_name",
"values":[
"Secure Site Pro SSL"
]
}
],
…
}
…
}
Combine “and” conditions with “or” conditions
You can also create filter criteria that combines “and” conditions with “or” conditions.
For example, this filters array creates a report that includes rows for any orders where:
- The order status (
order_status) column isRevokedAND - The product name (
product_name) column isSecure Site Pro SSLORSecure Site Pro EV SSLAND - The order created date (
order_created_date) column has a date between 2021-01-01 and 2021-01-07 AND - Any part of the string in the common name (
common_name) column containsexample.comORexample.net
{
…
"report_metadata": {
"report_type": "orders",
"columns": […],
"filters": [
{
"filter_identifier":"in",
"column_identifier":"order_status",
"values":[
"Revoked"
]
},
{
"filter_identifier":"in",
"column_identifier":"product_name",
"values":[
"Secure Site Pro SSL",
"Secure Site Pro EV SSL"
]
},
{
"filter_identifier": "custom_date",
"column_identifier": "order_created_date",
"values": [
"2021-01-01",
"2021-01-07"
]
},
{
"filter_identifier":"contains",
"column_identifier":"common_name",
"values":[
"example.net",
"example.com"
]
}
],
…
}
…
}