Content Filters

Browser Filters "p-filters"

13min




PFilters Documentation

Overview

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"]}]

Use Cases

  • 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

URL Structure

To implement a PFilter, append the following structure to your dashboard URL:

your-domain.domo.com/embed/pages/private/YOUR-PAGE-ID?pfilters=[{FILTER-PARAMETERS}]

Basic Filter Format

?pfilters=[{ "column":"ColumnName", "operand":"OPERAND_TYPE", "values":["Value1", "Value2"] }]

Implementation Steps

  1. Identify the column name from your Domo dataset that you want to filter on
  2. Select the appropriate operand (see list below)
  3. Determine the value(s) to filter by
  4. Construct the URL with the pfilter parameter
  5. Test the URL to ensure proper filtering

Example

Simple equals filter for a region:

example.domo.com/embed/pages/private/ABCDE?pfilters=[{"column":"region","operand":"EQUALS","values":["west"]}]

Multiple filters example:

example.domo.com/embed/pages/private/ABCDE?pfilters=[{ "column":"Pos", "operand":"IN", "values":["TE","WR"] }, { "column":"Location", "operand":"IN", "values":["Amsterdam","Anchorage"] }]

Supported Operands

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]

Important Notes

  • 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.

Filter Persistence

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.

Troubleshooting

  • 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

References

For more information, refer to Domo's official documentation on PFilters and programmatic filtering.