Skip to main content
Get Started
Documentation

Create custom dashboard filters in Tractorscope

Within the dashboards you can create and manage custom filters

Filters opens the Filter menu.
Tractorscope dashboard filter menu for creating and managing custom filters

Click + to create a new Filter

Add filter button in the Tractorscope dashboard filters panel

The Edit Filter modal opens

Create the Filter. The Filter Name is used to identify the Filter within the query. Add the values and Save.
Edit filter modal in Tractorscope with filter name and selectable values
The names are used to identify the value from the dashboard interface.
Custom filter value names used in Tractorscope dashboard SQL queries
When writing the query in SQL, you would use User against the column you want to filter. MySQL example:
select *
from payments
where [customer_id=User]
select *
from payments
where [customer_id=User]
This query would generate the following when John A. is selected:
select *
from payments
where customer_id in (1241)
select *
from payments
where customer_id in (1241)

When choosing multiple custom filters

Multiple selected custom filter values on a Tractorscope dashboard
The generated query would be:
select *
from payments
where customer_id in (1241, 9321)
select *
from payments
where customer_id in (1241, 9321)

Using Mongo driver, would be a query like:
{
  "find": "payments",
  "filter": {
    "customer_id": "[User]"
  }
}
{
  "find": "payments",
  "filter": {
    "customer_id": "[User]"
  }
}
This would generate a query like:
{ 
	"count": "payments",
	"query": { 
		"customer_id": { 
			"$in": [ 1241, 9321 ] 
		}
	}
}
{ 
	"count": "payments",
	"query": { 
		"customer_id": { 
			"$in": [ 1241, 9321 ] 
		}
	}
}

Related docs