|
''RecordQueryDataSource'' Element |
|
|
RecordQueryDataSource is used a to define data source that queries the records of text files. The records of the text file are read one by one and the fields that are either separated with separators or has fixed portions on records are transferred to the ADOM of the data source. By referring to the values of the mapped fields of to the other MScript symbols the input records can be processed conditionally. For each input record that satisfies the Record Selection Precondition an output ADOM node is created.
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:
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
sequence-number
column-name
mscript-expression
start-position
length
Examples:
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' "Scope", "Refresh Timeout", "Execution Precondition", "Items Per Page", "Pages Per Block" and "Debug" properties are standard data source properties and you can refer to main help file for the details. |