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.
To extract using character offset
@parse([FieldSource], "delimiter", field number, length)
@parse([
FieldSource
], "starting delimiter", "ending delimiter", field number, length)
Example extraction using character offset
Data: PRINT100STD0C
Command | Result |
---|---|
@parse(documentName,1,8)
|
PRINT100 |
@parse(documentName,9,4)
|
STD0 |
@parse(documentName,13,0)
|
C |
To extract using delimiters
- Select Delimited List.
- 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 \\.
- 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.
- 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.)
- 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.
- Click OK.
@parse([FieldSource], "delimiter", field number, length)
@parse([FieldSource], "starting delimiter", "ending delimiter", field number, length)
Example extraction using delimiters
Example
Data: CJ,P038,FC=6,F=OCR1,ID=J0006600,ACCOUNT=DC
Command | Result |
---|---|
@parse(documentName, \,F=, \,, 1, 0)
|
OCR1 |
@parse(documentName, \,ACCOUNT=, \,, 1, 0)
|
DC |
@parse(documentName, \,P, \,, 1, 10)
|
038 |