Page Parameter Filter Block

The Page Parameter Filter block is an easy way to add some powerful functionality to your pages. In short, it works by adding page parameters to a URL according to selections made within the block itself. For instance, if the block is used to select a Connection Opportunity, then the URL will be updated with a page parameter that holds the GUID of the selected Opportunity. With the GUID present in the URL, it can now be referenced by other blocks or features.

Configure Block Settings

When the block is first added to a page it won't have any functionality until it's configured. The block settings you'll use to do this are described below.

  1. Block Title Settings - Similar to other blocks, you can customize the options for the block's title area using the fields provided.
  2. Filter Button Text - By default, the button to apply the filter is labeled as "Filter" but can be customized to your liking.
  3. Filter Button Size - The size of the Filter and Reset Filters buttons can be changed here. The default value is "Extra Small", but you can also select "Small" or "Normal" to make the buttons slightly larger.
  4. Filters Per Row - This setting controls how many filters are displayed in a single row within the block. This doesn't impact anything if you have only one filter.
  5. Filter Selection Action - This setting determines what happens when a non-textbox filter is selected:
    1. Do Nothing: No changes occur automatically. The viewer must manually click the filter button to apply their selections.
    2. Update Filters: Filters whose available values depend on the selected values of other filters will update automatically, but the viewer must still click the filter button to apply them. This is useful when filters rely on virtual page parameters This is useful when filters rely on selected values from other filter (via virtual page parameters). If Enable Legacy Reload is enabled, page parameter changes will appear in the query string instead of being virtual (i.e., invisible).
    3. Apply Filters: All filters are applied instantly, without the need to click the filter button.
  6. Redirect Page - If you provide a page here, the person will be redirected to that page as soon as they click the Filter button. The URL for the target page will include page parameters for the selected filters (see next section for details).
  7. Show Filter Button - If enabled, the Filter button will be visible. Typically, you'll only want to hide the button if the Selection Action (see below) is set to Update Page.
  8. Show Reset Filters Button - You can choose to hide the Reset Filters button if needed. This will keep the filter's information in the URL after it has been applied.
  9. Enable Legacy Reload - If enabled, a full page reload will be triggered to apply the filter selections (helpful when using this block to drive the behavior of non-Obsidian/legacy blocks on the page). If disabled, the filter selections will be communicated directly to any Obsidian blocks listening for these filters, so they can respond accordingly.
  10. Filters - This is where you'll add the filters that should be available for selection in the block. Adding filters to this block is like adding attributes to an entity. We'll look more closely at an example in the next section below.

Add Filters

If you've ever added an attribute to a person, group or other entity, then you're already familiar with adding filters to this block. As pictured below, these filters use many of the same fields as attributes.

The Key value you choose for the filter will appear as the name of the parameter in the URL after the filter is applied. You'll need to reference this value later, so try to pick something unique and descriptive.

In the example pictured above we've added a filter with a field type of "Connection Opportunity". As a result, a person accessing the page will be prompted to select a specific opportunity. We're only using a single filter here, but you can add as many filters as you need. Each filter functions independently from the others, so you can use a variety of different field types.

Now that a value has been selected the person should click the Filter button to apply it. Depending on your setup, the Filter button will do different things. It might redirect the person to a new page, or it could cause data to change in another block on the same page. In any case, it will update the URL with the filter's Key and the value of the person's selection.

Using our connection opportunity example, you can see below how the Key ("ConnOpp") and the GUID (of the "Greeter" opportunity) have been added to the URL.

Before:
https://rocksolidchurchdemo.com/page/123

After:
https://rocksolidchurchdemo.com/page/123?ConnOpp=6A7935B2-A97D-4F9D-82B3-4F835533325F

If you configured the block to redirect people to a different page, then the filter information will be appended to the URL of the target page in the same way. This can be very useful if the target page has a block that expects this information to already be in the URL, which won't happen until after the person clicks the Filter button.

Page Parameters and Lava

When combined with Lava, this block becomes a powerful tool that can be used in a variety of ways. All you need to do is add {{ 'Global' | PageParameter:'ConnOpp' }} to a workflow, report or anywhere else Lava is used. Just replace "ConnOpp" with the Key for your filter, and the doors are open.

Some blocks, like the HTML Content block, will need to have the RockEntity command enabled for this Lava to work. Pictured below is a basic example of an HTML block using the GUID of a connection opportunity to display the number of requests in the opportunity.

See our Lava documentation for more information.