▦K2 Advanced GridsDeveloper Portal / 0.23
Documentation / Data management

Advanced filtering

Find relevant records directly in the standard ListView. Filter loaded records by category, text, numeric conditions, dates and Boolean values, without adding separate filter controls to the form.

Category selection

Department categories, search and record counts
Figure 02 · Department categories, search and record counts · Actual K2 Runtime capture
Order Number in default category mode (text field)
Figure 04 · Order Number in default category mode (text field) · Actual K2 Runtime capture

Search values narrows the checkbox list; Select all applies to the currently shown values. Counts reflect all loaded records, not a cascading subset from other filters. Apply commits the selection; Cancel closes without applying; Clear removes the column filter.

Numeric conditions

Order Amount: numeric comparison operators
Figure 05 · Order Amount: numeric comparison operators · Actual K2 Runtime capture

Use equals, not equals, less/greater than, inclusive comparisons, inclusive between and empty/not empty. The Beta shares comparison labels with dates; the wording is on the UI polishing backlog.

Date conditions

Order Date: absolute and relative date operators
Figure 06 · Order Date: absolute and relative date operators · Actual K2 Runtime capture

Dates add Today, Last 7 days (including today), and This month, based on the browser local calendar. DateTime and Time examples will follow after the wider register is built.

Boolean values

Is Approved: 75 No and 175 Yes
Figure 07 · Is Approved: 75 No and 175 Yes · Actual K2 Runtime capture

Boolean filters present Yes and No independently of the native true/false cell display.

Combined filters and active filters bar

Choose HR and IT, Budget Variance greater than 1000, and Is Approved = Yes. Conditions across columns are combined with AND. Multiple checked values within one category are alternatives (OR).

Three filters reduce 250 loaded records to 8 matches
Figure 03 · Three filters reduce 250 loaded records to 8 matches · Actual K2 Runtime capture

Remove a chip to clear its condition, or use Clear all filters. Selecting no category values is a valid filter that matches no records.

No matching records: zero of 250
Figure 08 · No matching records: zero of 250 · Actual K2 Runtime capture

Configuration reference

Paths below are relative to defaults or an individual grid entry, unless stated otherwise. Defaults shown are effective fallbacks in Beta 1.0 when omitted.

ParameterType / fallbackEffect
filtering.enabledBoolean / true unless falseEnable filter controls and filtering
activeFilters.enabledBoolean / false unless trueDisplay active filter chips
activeFilters.maxValuesPositive integer / 3Maximum category values displayed before abbreviated label
showRecordCountBoolean / true unless falseShow counter when paging is disabled
showClearAllBoolean / true unless falseShow clear-all action
autoDetectTypesBoolean / true unless falseInfer type from K2 runtime metadata
textModecategory | text / categoryDefault mode for Text fields
columns[identifier].modecategory | textOverride Text field mode
columns[identifier].typeSupported normalized type nameOverride detected type
columns[identifier].enabledBoolean / true unless falseExclude column from filter model
language (root)auto | en | ar / autoChoose built-in UI language

Supported types in the engine: autoguid, autonumber, date, datetime, decimal, guid, memo, number, text, time, yesno. Column lookup tries key, control name and then title. Memo always uses text operators; Yes/No uses category selection.

Configuration examples

These fragments belong inside the complete template, not in a separate Data Label.

filtering: { enabled: true },
activeFilters: { enabled: true, maxValues: 3 },
showRecordCount: true,
showClearAll: true
columns: {
  "Order Number": { mode: "text" },
  "Vendor Name": { mode: "category" }
}

Text operator mode supports Contains, Does not contain, Equals, Does not equal, Starts with, Ends with and empty/not empty. The Order Number screenshot above illustrates category mode, not text operator mode.

Console commands

Important — required configuration change

Replace REPLACE_WITH_YOUR_AREAITEMID with the actual Area Item ID of your own ListView before using this example. See Grid Discovery. Without a matching ID the engine cannot target your ListView.

const gridId = "REPLACE_WITH_YOUR_AREAITEMID";
console.table(K2AdvancedGrids.instance.inspect());
K2AdvancedGrids.instance.clear(gridId);
(() => {
  const gridId = "REPLACE_WITH_YOUR_AREAITEMID";
  const grid = K2AdvancedGridsConfig.grids.find(g => g.areaItemId === gridId);
  if (!grid) throw new Error("ListView not found in configuration");
  grid.columns = { ...grid.columns, "Order Number": { mode: "text" } };
  K2AdvancedGrids.instance.clear(gridId);
  K2AdvancedGrids.instance.refresh();
})();

Console changes are temporary; save the configuration file and increment its version for permanent changes. The text-mode example is source-derived and awaits a dedicated runtime screenshot.

Benefits and limitations

Compared with our baseline, users gain per-column filter controls, multi-column conditions and visible active filters. Filtering is client-side: it cannot retrieve records not already loaded by K2 and is not an authorization mechanism. Large unique-value lists may affect responsiveness; performance testing is pending. Keep native paging disabled for this scenario. If no icon appears, inspect detected types, check the configured Area Item ID and verify that the column is rendered and supported.

Downloads

Filtering configuration template ↓
Required after saving a configuration file

Update configVersion in the Data Label loader (for example from 0.3.0 to 0.4.0), save the form and reopen Runtime. Keep engineVersion unchanged unless the engine file was modified. Console-only experiments do not need a version change. See Installation & Deployment.

Enlarged screenshot