Element "BuildFilterProcess"

Top  Previous  Next

BuildFilterProcess should be used inside a process block. It is used to build a filter expression out of the values entered to the process block input fields in a process form. The filter expression built can then be used in a WHERE clause of a SQL SELECT statement.

BuildFilterProcess_pe

The values entered in to the process block input fields and the names of the input fields are used to build expressions that are convenient to be used in WHERE clause and the built expression is saved into the specified target symbol. This process do not perform the query itself. The expression built and transferred into a target symbol can be used in a RelDB datasource query as follows:

SELECT * FROM products 

  WHERE  @vof(p:filter)

 

 
It is possible to use logical operators inside the process block input fields during the run time as follows.

BuildFilterProcess

 
Parameters

Fields to include in Filter (Accepts MScript)

This parameter is used to define which of the process fields that exist in the process block that this process is resides in will be a part of the filter.

The syntax of a field definition:

[data-type:]process-field-name[/sql-field-name]

 
data-type
This specifier is optional. The only valid value for it is "s" and it denotes that the data type of the field is string. If no data-type specifier is given then the data type is determined by analyzing the field value.

process-field-name

The name of the process field to be included into the filter.

sql-field-name
This specifier is also optional. It becomes necessary when the the process field name and the name sql name are different.
 

Example:

PERSNAME/p.NAME

 

If all the block input fields in the process block should be included into the filter then "*" character can be used. To override the generic definitions implied by the "*", additional field definitions can be given after it.

Example:

*, s:PERSNAME/p.NAME, ID/c.ID

 

Fields to Exclude from Filter (Accepts MScript)

This parameter defines the list of the fields (separating with commas) to exclude from the filter.
 

Example:

Fields to include in Filter:

*

Fields to Exclude from Filter:

PCAT_ID, CATNAME

 

Logical Operator

The logical operator that ties the each comparison expression built. The choices are "AND" and "OR".

Target Symbol (Accepts MScript)

The symbol that will contain the built filter expression.
 
Examples:
v:filter
p:filter
f:filter
s:/filters/filterX