Skip to main content
Version: Next

View Filtering

The Filters tab allows you to refine the selection of records displayed in a view by adding custom SQL criteria or by enabling dynamic filtering panels (Pre-filters).

View Designer - Filters Tab

This tab is divided into two main areas: Pre-filters management (top) and Fixed filters (bottom).


1. Description (Dynamic Pre-filters)

Despite its name, the first Description field is used to define the technical structure of Pre-filters that will appear on the Web interface above the list.

How it works

Pre-filters are defined using XML syntax. Each tag generates an input field allowing the end user to filter data in real time.

XML Syntax

Here are the main elements you can use:

<!-- Numeric field -->
<number field="montant" label="Montant mini" OperatorDefaultValue="GreaterOrEqual" />

<!-- Date field -->
<date field="dateReclamation" label="Date de demande" OperatorDefaultValue="GreaterOrEqual" />

<!-- Text field with auto-completion -->
<text field="client" label="Nom du client" ServiceMethod="GetClientList" ServicePath="~/Services/Lookup.asmx" />
  • Required marker: For these filters to be applied, you must insert the {PreFilter} tag in your main SQL query (Conditions tab or Filters tab).
  • Activation: Don't forget to check Show pre-filter panel in the Options tab.

2. Filter query portion (Fixed filters)

The second area allows you to add an additional SQL WHERE condition that will be injected at the {filter} marker of the main query.

Default template

The Insert default filter button provides a standard structure to filter records related to another form:

AND Documents.id IN ( 
SELECT id_document FROM "FRM_VOTRE_FORMULAIRE" WHERE "COLONNE" = @filter
)

Dynamic Parameters

You can use the following system variables to contextualize your filters:

ParameterDescription
@filterContextual value passed to the view (e.g., ID selected in a navigator).
@UserNameDisplay name of the logged-in user (Display Name).
@UserFullNameInternal identifier (DN) of the logged-in user.
@UserLangUser's language code (e.g., 'FR').
@FilterFormName of the associated filter form.

3. Markers and SQL Injection

When generating the view, Process Studio assembles the different code portions by replacing specific markers:

  1. {filter}: Replaced by the content entered in the "Filter query portion". If this field is empty, the marker is simply removed.
  2. {PreFilter}: Replaced by the criteria entered by the end user in the Web pre-filtering panel.
  3. {Societes}: Replaced by the list of companies the user has access to (in the form 'SOC1','SOC2').

[!CAUTION] Watch out for case sensitivity: SQL language is often case-sensitive. Use quotes "ColName" for column names IF your database (e.g., Oracle or PostgreSQL) requires it.


See also: