Configure the @parse function

This function extracts data from a document property.

Use this procedure to configure the @parse function. The parse function is used to extract data from a document property (such as Document Name). The parse function will extract data using character offset (specifying a beginning position and length), single delimiters (specify just the starting delimiter, it will be used as the only delimiter, field number, and length), and double delimiters (specifying a starting delimiter, ending delimiter, field number, and length). When you create a business rule action to set document properties, the parsing command should be entered in the appropriate Value cell in the Document Properties dialog box.

  1. Right-click in the appropriate document property, and then click Insert Function @parse.
    This opens the @Parse dialog box.
  2. Right-click in the FieldSource box, click Insert Document Property, and select the document property from which data will be extracted.
    The document property will appear in brackets in the field source box.
  3. Determine if you want to extract data using character offset or double delimiters. Complete the steps in the appropriate section below.

To extract using character offset

  1. Select Field.
  2. In the Position box, specify the first position of the string to be extracted.
    The first character of source data is indicated by specifying a 1.
  3. In the Length box, specify the length of the string to be extracted.
    If the length specified is zero (0) or if the length is greater than the remaining data, then all data to the last character will be used.
  4. Click OK.
The function is inserted into the document property using the following format:

@parse([FieldSource], "delimiter", field number, length)
@parse([
                  FieldSource
               ], "starting delimiter", "ending delimiter", field number, length)
                

To extract using delimiters

  1. Select Delimited List.
  2. In the Starting delimiter box, specify the character that marks the beginning of the string. If a comma or backslash is used as the first character of the delimiter, then a backslash must precede the delimiter in the command. For example, a backslash delimiter will be shown in the command as \\.
  3. In the Ending delimiter box, specify the character that marks the end of the string. If a comma or backslash is used as the first character of the delimiter, then a backslash must precede the delimiter in the command. For example, a backslash delimiter will be shown in the command as \\. If there is only one delimiter, this field can be left blank.
  4. In the Field number box, specify the position of the field that will be extracted. (1 refers to the first field, 2 to the second, and so on.)
  5. In the Length box, specify the length of the string to be extracted. If the length specified is zero (0) or if the length is greater than the remaining data, then all data to the last character will be used.
  6. Click OK.
The function is inserted into the document property using one of the following formats:

@parse([FieldSource], "delimiter", field number, length)
@parse([FieldSource], "starting delimiter", "ending delimiter", field number, length)