Help users digest an ocean of data with appropriate Required Filters

In today’s world of massive IBM i tables — think millions of rows in customer, order, inventory, or transaction files — it’s easy to unleash an ocean of data on your users (and your system) with just one unfiltered grid load.

Developer feedback from the front lines of this phenomenon drove us to add a Required Filter feature to Nitro App Builder in early 2025, helping turn overwhelming seas of data into more focused, performant results. And as of the latest build (6.3.20251222), Required Filters can be dynamically overridden at runtime when desired through the use of linked app variables.

The end result is NAB developers can require users to specify one or more specific filters with non-blank values before the underlying widget (typically a grid) will even begin loading data. This makes it possible to require filtering that aligns with existing indexes or logical files for faster responses, avoiding accidental full-table dumps that can bring the system to a crawl.

Let’s walk through a simple example. Say we want to provide a customer name lookup grid over a massive database, and the only decent index available has the Country as the first key field, followed by the Customer Name as the second key. So for peak filter performance we must ensure that any customer name search includes a country as well.

The first step to set this up is to go to your grid widget’s Filter tab and select the columns for users to filter. Using our trusty DEMOCMAST customer master file as the basis for a grid, we’ll go into the grid widget, click the filter tab and the select the two columns, marking the Country as required as shown here:

Once one or more filter columns are marked as Required, the widget will not load when the app is launched until all the required filters have been specified, even if the grid is set to Auto Load, as you can see here:

So now we have a customer lookup app where a country filter value must be specified before the user will start to see data in the underlying widget. For most use cases this may be sufficient for preventing undesirable or inefficient back-end searches. But what if you wanted to override this required filter setting on the fly? Perhaps there are certain scenarios where a name search without a country is acceptable. In such situations, you could override the Required Filter setting at runtime using a linked app variable.

To illustrate the override setup, let’s go back into the app holding our grid widget and create a new app variable called noCountryRequired, as demonstrated here…

After hitting OK, we can now click on the link widget properties for the grid…

Then click on the “Required Filter” section to assign our new noCountryRequired app variable to the Country column…

Once this is done, setting noCountryRequired to ‘false’ — either via a front-end behavior or a back-end setAppVariable() call — will override (remove) the requirement that a country value be specified before the data is loaded.

Leveraging Required Filters configurations like this on can significantly reduce burden on system resources, particularly in apps with autoload grids that would otherwise be forced to sort through thousands or millions of unfiltered records upon app launch to load a page of data.