Property conditions file

Steps based on the SetDocPropsFromConditions step template set document properties or job properties in the current job using a property conditions file. The conditions defined in the file use a comma-separated value (CSV) format. A sample property conditions file is in/aiw/aiw1/samples/doc/DocPropConditions.csv. If you have the Postal Enablement feature, more sample files are in /aiw/aiw1/samples/control_files/postal.
    Important:
  • When you edit the property conditions file, open it in a text editor. Do not edit the file in Microsoft Excel.

You can use the property conditions file to set values for properties with conditions or without conditions. You can also use a separate include file to define properties using a property = value format.

Setting values using conditions

The first line in the property conditions file is a header row that lists the database names of document or job properties, separated by commas. Normally the leftmost part of the header row specifies the properties to test for one or more conditions, although this order is not required.

The header row is followed by one or more condition rows that define the conditions, and the property values to be set when all the conditions in that row are true. You can think of each condition row as representing an if-then statement. All specified conditions in a row are logically ANDed together and must all be true. If any of the conditions in a row are not true, none of the values in that row are set. The values in the condition rows are separated by commas.

This example shows the contents of a property conditions file that sets property values based on conditions:

Doc.Custom.MailCategory,Job.Name,Doc.Run.PAVE
=USPS,,Yes
=USPS,~XYZ*,No
=NonUSPS,,No
=Exception,,No

The first if-then condition specifies that if a mailpiece category is USPS, RICOH ProcessDirector sets the Doc.Run.PAVE property to Yes. The second row sets the value of Doc.Run.PAVE to No when the job name begins with XYZ.

We recommend that you place all properties that are part of conditions to the left of the properties that are receiving values.

Properties that are part of conditions use condition characters from this set:

Condition characters in the conditions file

Condition characters Condition Example/Notes
=[value] equal to =Fir
<>[value] not equal to <>Fir
<[value] less than <4900000
>[value] greater than >61000
<=[value] less than or equal to <=61207
>=[value] greater than or equal to >=61207
~[value] like ~INSURE*.PDF
!~[value] not like !~*.PDF
"([val1],[val2],...)" in (must start and end with parentheses surrounded by quotation marks) "(PRTA, PRTB)"
"!([val1],[val2],...)" not in (must start and end with parentheses surrounded by quotation marks) "!(PRTA, PRTB)"
(blank) wildcard (*) When a condition is blank, it is considered always true.

    Note:
  • You can use the pound sign (#) to add comments. Only complete lines can be comments; the # character must be in the first position in the line.
  • Spaces can separate keyword characters from condition values.
  • When setting positional properties, you can choose one of these two formats: property-name[process-name][phase-name][step-name] or [phase-name][step-name]. You cannot use positional properties to set other properties.
  • The ? and * characters are wildcard characters used with the like and not like conditions. The question mark matches single characters and the asterisk matches any number of characters.
  • You can use RICOH ProcessDirector symbol notation in the conditions file to set conditions or assign values based on the current value of a particular document or job property. See the topic titled RICOH ProcessDirector symbol notation in the Information Center for a description of symbol notation syntax. You can also use symbol notation with literal string values; see below for more information.
  • If a condition field has an equal sign (=) without a value, the condition is true if the job's property value is null. If a field has an empty value, the property is ignored for that row; it is not part of any condition and its value is not changed. Because of this rule, the step cannot set a job property to null. To set a property to null manually, use the expression ${null}.
  • Each row is evaluated independently.
  • All rows with conditions that match a job's or document's properties are applied. The rows are applied in the order that they occur in the conditions file. Within each row, property values are applied from left to right.
  • Leading and trailing blanks are removed from field values before any comparison or set operation takes place. Blanks within a value (not leading or trailing) are retained.

Using a segment of a property value with symbol notation and the substring specifier

If you want to use only a portion of a property in a condition - such as using only the first 5 characters of a property's value - you can use the substring specifier to indicate the portion of the property that you want to use.

The syntax is:

  • ${property_name;substr;start;length}
where:
  • property_name is the name of the property, such as Job.Name.
  • start is the position in the string that you want to start from.
  • length is the number of characters to use in the condition; if you enter a length that is more than the number of characters in the property, the rest of the property is used.

    Note:
  • The string is zero-base indexed; for example, the first character is in position 0 and the fifth character is in position 4.

This table shows some examples:

Examples of substring values

Property conditions file contains... Property value Result
${Job.Name;substr;0;4} Job.Name = USPS-FullService USPS
${Job.Name;substr;5;8} Job.Name = USPS-OversizeFlat Oversize

Creating concatenated values with symbol notation

In addition to using symbol notation to set conditions or assign values based on the current value of a particular property, you can combine symbols to create a concatenated single value, or use them with literal strings.

This table shows some examples:

Examples of concatenating property values

Property conditions file contains... Actual property values Result
Job.Custom.A,Job.Custom.Z

${Job.Custom.D}${Job.Custom.E},4

Job.Custom.D=5 and Job.Custom.E=9 Job.Custom.A=59

Job.Custom.Z=4

Doc.Custom.MailCategory,Job.Name,Doc.Run.PAVE

=USPS,${Job.Custom.D} Flat,No

Doc.Custom.MailCategory=USPS and Job.Custom.D=Oversize

Job.Name=Oversize Flat

Doc.Run.PAVE=No

Setting values without defining conditions

The format of the conditions file is the same, with a header row that contains property database names and a second row that lists property values. However, the conditions file contains only two rows. If you include more than one row of property values, only the values specified in the last row are saved.

This example shows the contents of a property conditions file that sets property values without using conditions:

Doc.Custom.MailCategory,Job.Name,Doc.Run.PAVE
USPS,PostalDiscount,Yes

Setting values with a separate include file

If you have a collection of properties that remain the same for several workflows, you can define those properties in a separate include file that you refer to in the property conditions file.

To refer to a separate include file, put @include in the header row of the property conditions file, and specify the relative or absolute path to the include file in the second row of the property conditions file.

    Important:
  • Use the Linux delimiting character (/) to specify the absolute directory path to the include file on a Windows system. For example, if the include file on a Windows system is at C:\Projects\data.txt, specify /Projects/data.txt.

This example shows the contents of a property conditions file that contains @include and a path to a separate include file:

Doc.Custom.MailCategory,Job.Name,@include
USPS,Priority,../prop-assignments/usps-properties.txt

In this example, the Mail Category property is assigned the value of USPS, the Job Name property is assigned the value Priority, and the relative path to the include file usps-properties.txt is specified.

The include file defines property values using the format Property name = Value. This example shows the format of the include file:

Doc.Insert.RecipientName=George Rogers
Job.CustomerName=CerbCo

The conditions file is processed from left to right and from top to bottom. This table contains examples to show how the property conditions file and the include file can override properties that were previously set. (These examples are for illustration only and are not intended as actual uses of the conditions file.)

Examples of processing order for the conditions file and include file

Property conditions file contains... Include file contains... Result
Job.Name,@include

=,../prop-assignments/usps-properties.txt

Job.Name=FlatFold If the Job Name is not already defined, the include file defines it as FlatFold.
Doc.Custom.Zip, Doc.Custom.Location, Doc.Custom.Location, @include

<50000, EAST, NEW HAMPSHIRE, /Projects/data.txt

Job.CityPopulation = 42400 If Zip is <50000, the conditions file sets Location = EAST, then the conditions file sets Location = NEW HAMPSHIRE, then the include file /Projects/data.txt sets CityPopulation = 42400.

Doc.Custom.Location = NEW HAMPSHIRE

Job.CityPopulation = 42400

Doc.Custom.Zip, Doc.Custom.Location, @include, Doc.Custom.Location

<50000, EAST, /Projects/data.txt, NEW HAMPSHIRE

Doc.Custom.Location = CONCORD

Job.CityPopulation = 42400

If Zip is <50000, the conditions file sets Location = EAST, then the include file /Projects/data.txt sets Location = CONCORD and CityPopulation = 42400, then the conditions file sets Location = NEW HAMPSHIRE.

Doc.Custom.Location = NEW HAMPSHIRE

Job.CityPopulation = 42400

Doc.Custom.Zip, Doc.Custom.Location, @include, @include

<50000, EAST, /Projects/data.txt, /Projects/data2.txt

/Projects/data.txt

Doc.Custom.Location = CONCORD

Job.CityPopulation = 42400

/Projects/data2.txt

Doc.Custom.Location = US ROUTE 202

Job.CityPopulation = 52400

If Zip is <50000, the conditions file sets Location = EAST, then the include file /Projects/data.txt sets Location = CONCORD and Population = 42400, then the include file /Projects/data2.txt sets Location = US ROUTE 202 and CityPopulation = 52400.

Doc.Custom.Location = US ROUTE 202

Job.CityPopulation = 52400

    Note:
  • You can use RICOH ProcessDirector symbol notation as part of the include file name. For example, if you use the include file name ${Job.RequestedPrinter}.equipmentprops.txt, the system can choose the correct set of properties to define for each requested printer (for each value of Job.RequestedPrinter). See the related Reference topic for a description of symbol notation syntax.