Brilliant Database Software - Home
Database software - Online Help System

Online Help System

Back to Brilliant Database Web-Site | Write to Support | Help Index



Fields/Variables Properties of a Parser

table border="0" width="100%" cellspacing="0" cellpadding="4" bgcolor="#00000077">
Fields/Variables Properties of a Parser

This tab allows you to define in what way blocks of text will be parsed by fields and/or by variables:

Let us review an example with parsing currency rates. After parsing by blocks, we will have the following text as input:

11.11.2009, USD=1.51

We need to place "11.11.2009" to the [Date] field, "USD" - to the [Currency] field, and "1.51" - to the [Rate] field. To add a rule of parsing to the field, click the "Add..." button; to change the existing rule - click the Edit..." button. The window with rule settings will be opened.

Here you should specify:

  • Text From - line that precedes the value that we want to get. For example, the name of currency (USD) is always between ", " and "=",; therefore, you need to specify "," in this field. For the currency rate (1.51) in this field it is necessary to specify "=". The date is at the beginning, so this field should be empty (that is, from the beginning of text).
  • Up to - line that follows the value that we want to get. For example, the name of currency (USD) is always between ", " and "=",; therefore, you need to specify "=" in this field. The currency rate is at the end, so this field for it should be empty.
  • To Field - in what field the value should be passed.
  • To Variable - in what variable the value should be stored. This variable can be afterwards used in the script that is called after parsing every block of text (see the "Scripts" tab).
  • Apply Format - apply formatting to the retrieved value. For example, if we want the currency name to be specified in the lowercase, you can define the formatting string "text LCASE", and then the value in the field will be "usd", not "USD". Learn more about formatting...

Independent/Sequential Field Parsing

You can parse text by fields sequentially, as well as independently from other fields. The check box at the lower part of the "Fields/Variables" tab is responsible for this:

In case of independent parsing, the search for value of every field is started from the beginning of the text. In case of sequential parsing (the check box is not selected), the search for value of every field is started from the previous field. Sequential parsing is convenient if we have the same characters as delimiters, for example: 11.11.2009,USD,1.51 In this case, for correct parsing we have to specify:

  1. Field [Date]: From: "", Upto: ","
  2. Field [Currency]: From: "", Upto: ","
  3. Field [Rate]: From: "", Upto: ""

The value of the [Currency] and [Rate] fields will be taken not from the beginning of the text, but from the previous value. This will also be reflected in the list of fields:



All topics in the "Import/Parse Template Properties" section: