''RecordQueryProcess'' Element

Top  Previous 

RecordQueryProcess element is used to query the records of a text file and select the records that match the search criteria.

RecordQueryProcess is a Query Process which means it can include sub-processes under it. The input records of a sub-process are provided by the query process.

Place the element into a ProcessBlock or ProcessForm element and set its properties.

RecordQueryProcess_pe

Properties

Input File Name (Accepts MScript)

The name of the text file to be read. It can be absolute or relative to the root directory of the web application.

Input File Encoding (Accepts MScript)

The encoding of the input file.

Value Extraction | Fields (Accepts MScript)

Options:

1.Are Separated with Separators
If the field values are separated with separators on the records on the file as it is the case for MS Excel files with *.csv extension, use this option.
2.Has Fixed Portions
If the field values have fixed lengths and exist on fixed positions on the records, use this option.
 

Value Extraction | Separator

The value of the "Value Extraction | Fields" property is "1" a separator should be defined in this property.

Value Extraction | Field Mappings (Accepts MScript)

With the definitions made in this property, the fields, either separated with separators or have fixed portions, are mapped to pool variable. Each mapping definition either should be separated with ';' characters or should reside on a different line.

Definition syntax:

If the value of "Value Extraction | Fields" property is "1":

field-name : sequence-number or column-name or mscript-expression

 

If the value of "Value Extraction | Fields" property is "2":

field-name : start-position, length

 

field-name
The name of the field to map

 

sequence-number
The sequence number of the field starting from "1".

 

column-name
It is an alternative to the sequence-number and used to identify the columns with column names that increment in "A,B,C,,,,,Z,AA,AB,," order as it the case in MS Excel spreadsheets.

 

mscript-expression
MScript expressions can be used to define the exact value to map. The column names and the current record symbol "LINE" can be used as variables.

 

start-position
The start character position of the field in "Fixed Portions" mode.

 

length
The length of the field in "Fixed Portions" mode.

 

Examples:

Mapping with field sequence number

ID:1; NAME:2; DESC:4 

Mapping with column name

ID:A; NAME:trim(B); DESC:repl(C,'*','-') 

Mapping with fixed portions

ID:1,6; NAME:8,20; DESC:trim(sstr(LINE,35,80)) 

 

Record Selection Precondition

A precondition to select the current input record to process.

The value of this property must be a valid MScript test expression. The mapped fields and other MScript symbols can be used within the expression. Additionally, a variable named LINENUM that holds the current line number, can also be used.

Examples:

(ID != '') and (NAME != '')  @// If ID and NAME is not empty

LINENUM > 1                 @// If Input Record Count is greater than 1

'@sstr(NAME,1,3)' = 'OEM'    @// If the first 3 characters of the NAME field is 'OEM'