---
id: object/codeunit/20403
type: object
title: Codeunit 20403 "Qlty. Filter Helpers"
summary: Codeunit 20403 "Qlty. Filter Helpers" in Quality Management (Microsoft.QualityManagement.Utilities). 32 public procedures, 1 event subscribers. Introduced in BC29, still in BC30, changed in BC30.
tier: official
language: en
tags:
  - codeunit
  - quality management
versions:
  introduced: "29"
  last_changed: "30"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 8260b01577dc75b918ae6ac5793428e5387d2ffb6ac0a21a981e7055bb4b72df
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/Quality%20Management/app/src/Utilities/QltyFilterHelpers.Codeunit.al
    title: src/Apps/W1/Quality Management/app/src/Utilities/QltyFilterHelpers.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/10270
object_type: codeunit
object_id: 20403
name: Qlty. Filter Helpers
namespace: Microsoft.QualityManagement.Utilities
app: Quality Management
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in:
  - "30"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 33
  events: 0
  subscribers: 1
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 3
  called_by: 13
  implements: 0
---

# Codeunit 20403 "Qlty. Filter Helpers"

> Codeunit 20403 "Qlty. Filter Helpers" in Quality Management (Microsoft.QualityManagement.Utilities). 32 public procedures, 1 event subscribers. Introduced in BC29, still in BC30, changed in BC30.

Quality Management · Microsoft.QualityManagement.Utilities · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/Quality%20Management/app/src/Utilities/QltyFilterHelpers.Codeunit.al) · facts from BC29

## Event subscriptions

- HandleOnFindItemsByAttributesOnBeforeFilterItemAttributesBufferLoop subscribes to Codeunit "Item Attribute Management" OnFindItemsByAttributesOnBeforeFilterItemAttributesBufferLoop

## Procedures

- `BuildFilter(TableNo: Integer; IncludeWhereText: Boolean; var Value: Text): Boolean` (internal): Opens a filter page for a table and updates the supplied view when the dialog is accepted.
- `RunModalLookupTable(var ObjectID: Integer; ObjectIdFilter: Text)` (internal): Opens a table lookup dialog filtered by specified object IDs. Allows users to select from available tables matching the filter criteria. Behavior: - Filters to Table objects only (no pages, codeunits, etc.) - Applies ObjectIdFilter to restrict available tables - Opens Objects page in lookup mode - U...
- `RunModalLookupTableFromText(var TableReference: Text)` (internal): Opens a table lookup dialog and returns the selected table name as text. Converts between text table reference and numeric table ID internally. Input handling: - If TableReference is empty → shows all tables - If TableReference contains text/number → attempts to identify and pre-select that table Ou...
- `RunModalLookupFieldFromText(var TableReference: Text; var FieldReference: Text)` (internal): Opens a field lookup dialog for a specified table and returns the selected field name as text. Handles table identification automatically if table reference is unclear. Workflow: 1. If TableReference is blank → prompts user to select a table first 2. Identifies table ID from TableReference (name or ...
- `IdentifyTableIDFromText(var CurrentTable: Text): Integer` (internal): Resolves a text representation of a table to its numeric table ID. Handles both numeric IDs and table names/captions with intelligent fallback logic. Resolution logic: 1. If CurrentTable is numeric → returns that number directly 2. If CurrentTable is text → searches by Object Name first 3. If not fo...
- `IdentifyFieldIDFromText(CurrentTable: Integer; var NumberOrNameOfField: Text): Integer` (internal): Will return an field number of the field. If it's a number it presumes the text is just a number and the field id. If it's text then it will search first for field name, then afterwards field caption. If neither can be found 0 will be returned, no error will be thrown.
- `SetFiltersByExpressionSyntax(var RecordRef: RecordRef; ExpressionConditionalFilterSyntax: Text)` (internal): This function exists to get expression evaluator and other expressions to work. Input: FieldA=3,FieldB=4,FieldC=cow Output: Where( FieldA=const(3), FieldB=const(4), FieldC=const(5) ) **** Bad data is ignored intentionally ***
- `RunModalLookupAnyField(TableNo: Integer; OptionalTypeFilter: Integer; OptionalNameFilter: Text): Integer` (internal): Look up any field.
- `AssistEditZone(LocationFilter: Code[20]; var ToZoneCodeFilter: Code[20]): Boolean` (internal): Starts the assist edit dialog for choosing a zone.
- `AssistEditBin(LocationFilter: Code[20]; ToZoneFilter: Code[20]; var ToBinCodeFilter: Code[20]): Boolean` (internal): Opens a bin lookup filtered by location and zone.
- `AssistEditItemNo(var ItemNoFilter: Code[20]): Boolean` (internal): Opens an item lookup and updates the item number filter.
- `AssistEditItemCategory(var ItemCategoryCodeFilter: Code[20]): Boolean` (internal): Starts the assist edit dialog for choosing an item category.
- `AssistEditInventoryPostingGroup(var InventoryPostingGroupCode: Code[20]): Boolean` (internal): Opens an inventory posting group lookup and updates the selected code.
- `AssistEditVendor(var VendorNoFilter: Code[20]): Boolean` (internal): Starts the assist edit dialog for choosing a vendor.
- `AssistEditCustomer(var CustomerNoFilter: Code[20]): Boolean` (internal): Starts the assist edit dialog for choosing a customer.
- `AssistEditMachine(var MachineNoFilter: Code[20]): Boolean` (internal): Starts the assist edit dialog for choosing a machine.
- `AssistEditRouting(var RoutingNoFilter: Code[20]): Boolean` (internal): Starts the assist edit dialog for choosing a routing.
- `AssistEditRoutingOperation(InRoutingNoFilter: Code[20]; var OperationNoFilter: Code[20]): Boolean` (internal): Opens a routing operation lookup for a routing.
- `AssistEditWorkCenter(var RoutingNoFilter: Code[20]): Boolean` (internal): Opens a work center lookup and updates the selected number.
- `AssistEditPurchasingCode(var PurchasingCode: Code[20]): Boolean` (internal): Opens a purchasing code lookup and updates the selected code.
- `AssistEditReturnReasonCode(var ReturnReasonCode: Code[20]): Boolean` (internal): Opens a return reason lookup and updates the selected code.
- `AssistEditQltyInspectionTemplate(var QltyInspectionTemplateCode: Code[20]): Boolean` (internal): Opens a quality inspection template lookup and updates the selected code.
- `AssistEditLocation(var LocationCodeFilter: Code[20]): Boolean` (internal): Opens a location lookup and updates the location selection filter.
- `AssistEditUnitOfMeasure(var UnitOfMeasureCode: Code[10]): Boolean` (internal): Opens a unit of measure lookup and updates the selected code.
- `CleanUpWhereClause2048(Input: Text): Text[2048]` (internal): Extracts and truncates the WHERE clause from a table view.
- `CleanUpWhereClause(Input: Text): Text` (internal): Extracts the WHERE clause from a table view.
- `DeserializeFilterIntoItemAttributesBuffer(AttributeFilter: Text; var TempFilterItemAttributesBuffer: Record "Filter Item Attributes Buffer" temporary)` (internal): De-serializes an existing attribute filter text into an attribute filter buffer.
- `SerializeItemAttributesBufferIntoText(var TempFilterItemAttributesBuffer: Record "Filter Item Attributes Buffer" temporary): Text` (internal): v18 and newer only. Given an item attributes buffer, serializes it into a 'pretend' filter similar to BC's filtering mechanism. A=Filter(B),C=Filter(D),E=Filter(F)
- `BuildItemAttributeFilter2048(var ItemAttributeFilter: Text[2048])` (internal): Opens item attribute filter selection and updates a filter limited to 2048 characters.
- `BuildItemAttributeFilter(var ItemAttributeFilter: Text)` (internal): Opens item attribute filter selection and serializes the accepted filter.
- `SetItemFilterForItemAttributeFilterSearching(ItemNo: Code[20])` (internal): Not intended to be used outside of the Quality Management application. Intended to be used with BindSubscription for the OnFindItemsByAttributesOnBeforeFilterItemAttributesBufferLoop hook.
- `GetIsFilterSetToValue(TableNo: Integer; Filter: Text; FieldNo: Integer; ExpectedVariant: Variant): Boolean` (internal): Returns a true or false if the supplied field has a filter and it's set to the value.

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 3960 "Regex"](../codeunit/3960.md) (2 calls: `DeserializeFilterIntoItemAttributesBuffer → Groups`, `DeserializeFilterIntoItemAttributesBuffer → Match`)
- [Codeunit 8617 "Config. Validate Management"](../codeunit/8617.md) (1 call: `RunModalLookupTableFromText → LookupTable`)
- [Codeunit 9806 "Field Selection"](../codeunit/9806.md) (1 call: `RunModalLookupAnyField → Open`)

## Called by

- [Table 20404 "Qlty. Inspection Gen. Rule"](../table/20404.md) (9 calls: `AssistEditConditionAttributeFilter → BuildItemAttributeFilter2048`, `AssistEditConditionItemFilter → BuildFilter`, `AssistEditConditionTableFilter → BuildFilter`, …)
- [Page 20460 "Qlty. Whse. Gen. Rule S. Guide"](../page/20460.md) (4 calls: `AssistEditLocation → AssistEditLocation`, `AssistEditZone → AssistEditZone`, `CleanUpWhereClause → CleanUpWhereClause2048`, …)
- [Codeunit 20416 "Qlty. Expression Mgmt."](../codeunit/20416.md) (3 calls: `LookupFieldValueBasedOn → IdentifyFieldIDFromText`, `LookupFieldValueBasedOn → IdentifyTableIDFromText`, `LookupFieldValueBasedOn → SetFiltersByExpressionSyntax`)
- [Codeunit 20599 "Qlty. Misc Helpers"](../codeunit/20599.md) (3 calls: `ReadFieldAsText → IdentifyFieldIDFromText`, `SetTableValue → IdentifyFieldIDFromText`, `SetTableValue → IdentifyTableIDFromText`)
- [Codeunit 20405 "Qlty. Inspec. Gen. Rule Mgmt."](../codeunit/20405.md) (2 calls: `DoesMatchItemAttributeFiltersOrNoFilter → DeserializeFilterIntoItemAttributesBuffer`, `DoesMatchItemAttributeFiltersOrNoFilter → SetItemFilterForItemAttributeFilterSearching`)
- [Page 20415 "Qlty. Create Inspection API"](../page/20415.md) (2 calls: `CreateInspectionFromRecordID → IdentifyTableIDFromText`, `CreateInspectionFromTableIDAndFilter → IdentifyTableIDFromText`)
- [Page 20461 "Qlty. Rec. Gen. Rule S. Guide"](../page/20461.md) (2 calls: `CleanUpWhereClause → CleanUpWhereClause2048`, `UpdateFullTextRuleStringsFromFilters → CleanUpWhereClause2048`)
- [Page 20462 "Qlty. Prod. Gen. Rule S. Guide"](../page/20462.md) (2 calls: `CleanUpWhereClause → CleanUpWhereClause2048`, `UpdateFullTextRuleStringsFromFilters → CleanUpWhereClause2048`)
- [Page 20464 "Qlty. Asm. Gen. Rule S. Guide"](../page/20464.md) (2 calls: `CleanUpWhereClause → CleanUpWhereClause2048`, `UpdateFullTextRuleStringsFromFilters → CleanUpWhereClause2048`)
- [Table 20401 "Qlty. Test"](../table/20401.md) (2 calls: `AssistEditLookupField → RunModalLookupAnyField`, `AssistEditLookupTableFilter → BuildFilter`)
- [Table 20409 "Qlty. Inspect. Src. Fld. Conf."](../table/20409.md) (2 calls: `HandleOnLookupFromField → RunModalLookupAnyField`, `HandleOnLookupToField → RunModalLookupAnyField`)
- [Codeunit 20455 "Qlty. Job Queue Management"](../codeunit/20455.md) (1 call: `FindJobQueueEntriesForScheduleGroup → CleanUpWhereClause`)
- [Page 20440 "Qlty. Inspection Template Edit"](../page/20440.md) (1 call: `HandleOnAddFieldFromTable → RunModalLookupAnyField`)

## Recent changes

- 2026-08-20 [#10270 [Quality Management] Repair and improve XML documentation of procedures](../../changes/bcapps/10270.md) (main, BC30, refactor)

## Across versions

- Present in: BC29-30
- Changed (declaration) in: BC30

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Qlty. Filter Helpers")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
