Skip to main content
This event can only be processed by apps. Sending this event to an iframe that contains a non-app Omni URL, such as a dashboard, will have no effect on the embedded page.
Changes the filter overrides on one or more of an embedded app’s queries, without a reload. Only the fields included in the payload are affected. Fields the payload doesn’t name keep their current value.

Properties

object
Filter overrides to set, as an object of query name to field name to value. Omni applies each entry through omni.query(name).setFilter(), keyed the same way app:filter-changed reports filter changes.null is a filter value (is null), not a removal. To remove a filter, list it in removeFilters instead.
object
Filter overrides to remove, as an object of query name to an array of field names. Omni applies each entry through omni.query(name).removeFilter().Omni applies removals before sets. If a field appears in both filters and removeFilters, it ends up set.
If a field has an override from this event and a document control that also filters it, Omni combines them with AND instead of the override replacing the control. Setting both on the same field can narrow a query to no rows.

When to send this event

Send this event after Omni emits page:ready. If the app isn’t ready when the event arrives, Omni keeps the event and applies it once the app is ready:
  • If you send a navigate event, Omni discards the filters that are still waiting for the page the user leaves.
  • If you send this event after a navigate event, Omni applies the filters to the app where the navigation lands. If the navigation lands on a page without an app, Omni drops the filters.

Example

This example sets a filter on the orders query and removes an existing filter from the same query: