Browser Filters "p-filters"
PFilters (Python particle filters) allow you to apply pre-defined filters to embedded Domo Dashboards through URL query parameters. These filters are applied immediately upon page load, providing filtered data views while still allowing users to modify or remove filters as needed.
Real World Example https://jeanz.yoursubdomain.com/workspace/jeanz-app-studio/embed?group=basic-1&page=jeanz&pfilters=[{"column":"Store Region","operand":"EQUALS","values":["West"]}]
- Pre-filtering dashboards to specific regions or values
- Creating customized dashboard views for different user groups
- Linking between dashboards while maintaining context
- Simplifying user experience by pre-selecting relevant data
To implement a PFilter, append the following structure to your dashboard URL:
- Identify the column name from your Domo dataset that you want to filter on
- Select the appropriate operand (see list below)
- Determine the value(s) to filter by
- Construct the URL with the pfilter parameter
- Test the URL to ensure proper filtering
Simple equals filter for a region:
Multiple filters example:
Operand | Description | Example |
---|---|---|
IN | Match any value in array | "values":["TE","WR"] |
CONTAINS | Contains the specified text | "values":["sales"] |
EQUALS | Exact match | "values":["west"] |
NOT_EQUALS | Does not match | "values":["east"] |
GREATER_THAN | Greater than value | "values":[1000] |
LESS_THAN | Less than value | "values":[500] |
GREAT_THAN_EQUALS_TO | Greater than or equal to | "values":[100] |
LESS_THAN_EQUALS_TO | Less than or equal to | "values":[50] |
BETWEEN | Between two values | "values":[10, 20] |
- Spaces in Values: The browser automatically handles spaces in values by encoding them as %20. You don't need to manually encode spaces.
- Column Names: Use the exact column name from your Domo dataset.
- Array Format: Values must always use square brackets for the array format, even when only using a single value.
- Persisting Filters: Domo can automatically create PFilters when you check "Persist Filters" in the embed dialog.
- Link Between Dashboards: PFilters can be used to link between dashboards while maintaining filter context.
When "Persist Filters" is enabled in the embed dialog, Domo automatically creates PFilters that carry over when:
- Users navigate between pages
- Users click on external links (with Card interactions turned on)
- Filter selections are made on the dashboard
This allows for a consistent user experience when navigating through multiple dashboards.
- Verify column names exactly match those in your dataset
- Check that operands are in all caps (e.g., "EQUALS" not "equals")
- Ensure values are properly formatted in the array syntax
- Validate the complete URL in the browser's address bar
- Use the browser's network tab to confirm filter parameters in POST requests
For more information, refer to Domo's official documentation on PFilters and programmatic filtering.