Barr EOM
Barr EOM functions are used to insert information into a document property. The @parse, @dateTimeToString, @schedule, and @stringToDateTime functions allow you to extract data from a document property and insert it into another document property.
Review the following table for a description of each function. Click the links for steps on how to configure each function.
Function |
Description |
Converts a date/time (usually from another document property) to a string | |
Looks up the value for a property in a .csv file | |
Extracts data from a document property | |
Inserts a time into a document property | |
Converts a string (usually from another document property) to a date/time value | |
Specifies the name format for newly created burst documents |
Use this procedure to configure the @dateTimeToString function. This function converts a date/time to a string in the format specified. This string will be inserted in the document property you are configuring.
Right-click in the appropriate document property and select Insert Function | @datetimeToString. The @DateTimeToString dialog box displays.
In the FieldSource box, specify the document property that contains the date/time string you want to insert. Right-click in the box, select Insert Document Property, and select the document property from the list.
In the Format box, enter the format the date/time string will use when it is inserted into the document property. See the Format grids for descriptions of the available formats.
In the Culture box, specify the culture name of the data in the document. The default is the current culture of the computer where the Barr EOM Console is running. When culture is not specified, the culture independent CultureInfo.InvariantCulture is used.
Click OK. The function is inserted into the document property using the following format: @dateTimeToString([FieldSource],"Format",Culture)
Use this procedure to configure the @LookupCsv function. This function looks up the value for a property in a comma separated values file. The value will be inserted in the document property you are configuring.
Right-click in the appropriate document property and select Insert Function |@lookupCsv. The @LookupCsv dialog box displays.
Select how you want to locate the .csv file. You can use one of the following options:
Path - Enter the path and file name of the .csv file, or click the Browse (...) button to navigate to the file.
Resource - Select the appropriate resource from the list, or click the Browse button to choose the resource from the Manage CsvDocProp Resources dialog box. If you are using a resource, "CsvDocProp:" will be inserted before the resource name.
In the Lookup data box, specify the data you are looking up. This could be data from another document property or the results of an @parse function.
To select a document property, right-click in the box, select Insert Document Property, and then select the appropriate property from the list.
To use the results of an @parse function, right-click in the box, select Insert Function, and then @parse() from the list. Configure the @parse function using the @Parse dialog box.
In the Key column name box, enter the column name in your .csv file where EOM should look for a value that matches the data you entered in the Lookup data box.
In the Data column name box, enter the column name in your .csv file that contains the value you want inserted into the document property.
Click OK. The function is inserted into the document property using the following format: @lookupCsv("path/resource",lookup data,key column name,data column name)
Use this procedure to configure the @parse function. The parse function is used to extract data from a document property (e.g. 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 on the Document Properties dialog box.
Right-click in the appropriate document property and select Insert Function | @parse. The @parse dialog box displays.
In the FieldSource box, specify the document property from which data will be extracted. Right-click in the box, select Insert Document Property, and select the document property from the list. The document property will appear in brackets in the field source box.
Determine if you want to extract data using character offset or double delimiters. Complete the steps in the appropriate section below.
Select Field.
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.
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. The function is inserted into the document property using the following format: @parse([FieldSource], position, length)
Example
Data: PRINT100STD0C
Command |
Result |
@parse(documentName,1,8) |
PRINT100 |
@parse(documentName,9,4) |
STD0 |
@parse(documentName,13,0) |
C |
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. 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)
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 |
Use this procedure to configure the @schedule function. This function inserts the configured schedule into a string or date/time document property. Note, that you are not scheduling a document. You are just configuring a date/time using a schedule. The date/time string will be inserted in the document property you are configuring.
Right-click in the appropriate document property and select Insert Function | @schedule. The Schedule dialog box displays.
Set the appropriate Day option.
Set the appropriate Time option.
If you are inserting the schedule into a document property with a string type, you must also configure the following:
In the String format box, enter the format the date/time string will use when it is inserted into the document property. See the Format grids for descriptions of the available formats.
In the Culture box, specify the culture name of the data in the document. The default is the current culture of the computer where the Barr EOM Console is running. When culture is not specified, the culture independent CultureInfo.InvariantCulture is used.
Click OK. The function is inserted into the document property using one of the following formats:
For date/time properties: @scheduleDateTime(daytype,dayvalue,timetype,timevalue,,)
For string properties: @scheduleString(daytype,dayvalue,timetype,timevalue,format,culture)
Use this procedure to configure the @stringToDateTime function. This function converts a string to a date and time in the format specified. The string could be an extracted variable or another document property. This function inserts the configured date/time into a date/time document property.
Right-click in the appropriate document property and select Insert Function | @stringToDateTime. The @StringToDateTime dialog box displays.
In the FieldSource box, specify how you want to retrieve the date/time that will be inserted in the document property. You can do this using one of the following methods:
FieldSource – Right-click in the box, select Insert Document Property, and select the document property from the list.
Output Variable – Right-click in the box, select Insert Variables, and select the output variable from the list. You can also enter the output variable directly in the box. The variable must be surrounded with curly braces {}. The output variables are from an Advanced Document Modification rule or an extraction variable from an extract rule (line mode or page mode) or burst rule (line mode or page mode).
In the Format box, enter the format the date/time string will use when it is inserted into the document property. See the Format grids for descriptions of the available formats.
In the Culture box, specify the culture name of the data in the document. The default is the current culture of the computer where the Barr EOM Console is running. When culture is not specified, the culture independent CultureInfo.InvariantCulture is used.
Click OK. The function is inserted into the document property using one of the following formats:
@stringToDateTime(FieldSource,Format)
@stringToDateTime(FieldSource,Format,Culture)
@stringToDateTime({OutputVariable},Format)
@stringToDateTime({OutputVariable},Format,Culture)
Use this procedure to configure the @counter function. This function is only used if you are configuring a business rule to burst using page mode, and you can only enter the function in the Document Name property. This function allows you to specify the name format for the newly created burst documents.
Right-click in the Document Name property and select Insert Function | @counter. The @Counter dialog box displays.
Specify the Counter length.
Specify the Separator you want to use.
Click OK. The function is inserted into the Document Name property using the following format: @Counter(counter length,separator)
Example
If you burst MyDoc into 5 new documents and you specified @Counter(3,#) in the Document Name property, the documents would be named as follows:
MyDoc#001
MyDoc#002
MyDoc#003
MyDoc#004
MyDoc#005