Document properties
Conditions
Property Description
Condition
If a condition is assigned and returns the result True, the document inserts into the bundle.
If the condition returns the result False, the document does not insert into the bundle.
For more information, refer to Assign a condition to an object.
Notes
The script defined here is interpreted after the BeforeInsert script executes.
The condition has access to document data collected by the corresponding DataReference.
Data Model
Property Description
Selection Stores the associated selection.
Events
Event
AfterInsert
BeforeInsert
DefinitionArch iving
Description
This event is set for document references in a bundle. The script runs after the document is inserted into the bundle.
Context: TextDocumentReference
This event is set for document references in a bundle. The script runs before the document is inserted into the bundle.
If InsertObject is True after the script has run, processing continues with the evaluation of the condition.
Context: TextDocumentReference
This event is set for document references in a bundle and executes after the DefinitionGrouping event.
You can use the script to set attributes for archiving. Use the SetArchiveAttribute function to define
1-n archive attributes that pass on to Odin for each job.
The following two alternative ways of defining the archive attributes are supported.
Alternative 1
The attributes to be used are assigned in a string in the following form, for example: by building a string list and converting it to a string as an archive attribute string assigned to the Content variable.
Name=Value <CR><LF>Name=Value
In doing so, each individual attribute inserts into the archive dictionary.
Example
StringlistAdd("List", "ArchiveAttribute1=Value1")
StringlistAdd("List", FormatStr("%s%s", "ArchivCity=", SYSTEM.CITY
)
Content = String("List")
Alternative 2
All scripts executed in the context TextDocumentReference can call the SetArchiveAttribute function to insert attributes into the archive dictionary. The attributes of the archive dictionary pass to Odin for each job.
Example
96
DefinitionGro uping
DefinitionSorti ng
Load
Unload
SetArchiveAttribute("MyArchiveVar1","Value1")
SetArchiveAttribute("MyArchiveVar2","Value2")
Context: TextDocumentReference
For more information, refer to Identical archive attributes for all documents in a bundle
and Transfer data from a document to the ODIN_JOB table .
This event is set for document references in a bundle and executes after the DefinitionSorting event.
You can use the script to set attributes for grouping. A sorting criterion is defined here as a string with a maximum of 256 characters. This passes on to Odin as the Grouping attribute for each job.
Two alternative ways of defining the group string are supported.
Alternative 1
The group string to be used is assigned to the Content variable. In this way, the Grouping property of the TextDocumentReference context assigns to the corresponding value.
Example
Content = FormatStr("%s%s", "myGrouping: ", SelVariable("PARTNER",
"PAR_FirstName", ""))
Alternative 2
All scripts executed in the TextDocumentReference context have read and write access to the
Grouping property.
The content of this property passes on to Odin as the attribute grouping for each job.
As in Alternative 1, it thereby is possible to extend or overwrite a predefined grouping criterion in subsequent events.
Example of extending the grouping criterion
dummy_Group = Grouping
Grouping = FormatStr("%s%s", "MyGroupimgAdd + ", dummy_Group)
Context: TextDocumentReference
This event is set for document references in a bundle and executes after documents are created.
You can use the script to set attributes for sorting. A sorting criterion is defined here as a string with a maximum of 256 characters. This passes on to Odin as the Sorting attribute for each job.
Two alternative ways of defining the sort string are supported.
Alternative 1
The sort string to be used is assigned to the Content variable.
The Sorting property of the TextDocumentReference context is assigned the corresponding value.
Example
Content = FormatStr("%s%s", "mySorting: ", SelVariable("PARTNER",
"PAR_FirstName", ""))
Alternative 2
All scripts executed in the TextDocumentReference context have read and write access to the
Sorting property.
The content of this property passes on to Odin as the Sorting attribute for each job.
As in Alternative 1, it thereby is possible to extend or overwrite a predefined sort criterion in subsequent events.
Example of extending the sort criterion
dummy_Sort = Sorting
Sorting = FormatStr("%s%s", "MySortingAdd + ", dummy_Sort)
Context: TextDocumentReference
This script executes when a document is loaded.
Context: TextDocument
This script executes after inserting all text blocks and before the DefinitionSorting event.
97
Context: TextDocument
General
Property
Archive
Description
Specifies if the document is archived after it has been created.
This property is available to documents in bundles.
CopyLabel The text defined here inserts into the CopyLabel content control of a document copy.
This property is available to document copies in bundles.
For more information, refer to Create the Content Control CopyLabel .
CustomIndex
CustomUIReference The assigned Word User Interface.
This property is available to documents in bundles.
DataID
The value can be freely defined and used for subsequent queries.
This property is available to documents in bundles.
This property stores the associated selection.
This property is available to documents in bundles.
DocumentReference Name of the document.
Expandable Defines whether the user can see the document structure and is allowed to activate or deactivate its objects.
NumberOfCopies
OriginalID
Password
PrintDefinition
Number of copies of this document to create.
This property is available to documents in bundles.
Unique ID of the object.
This property is available to document copies in bundles.
If a password is defined, users can only edit text blocks with the property
TextComponentProtection=TRUE if they know the password. This property is available to documents in bundles.
Use this property to define the printer, form and print time for the document.
Specification of printer and form is optional.
If the fields are not set, they must be defined by the business user in the PDC Client.
In this case, activate the option Changes allowed and also the print time unknown.
By choosing local as printing time, you set up the document
1. for direct printing
2. and in addition, for local printing.
In the PDC Client, you are prompted to select printer and forms when choosing
Print and Archive.
This property is available to documents in bundles.
TextInsertionRule
Title
Visible
Rule
Activated
Effect
If the document cannot be inserted during generation, no abort is forced.
Deactivated The document is deactivated and the user cannot activate it.
Disabled
Required
The document does not be insert into the bundle.
Bundle generation aborts if the document cannot be inserted.
The value defined here is the name of the document the user sees in the PDC Client.
Defines whether the document is visible to end users.
98
Object definitions
Property Description
VariableObjectDefinition Contains the settings for variable documents.
To create a variable object definition, complete one of the following steps.
Drop an alias table on the document.
Right-click the VariableObjectDefinition property and click Create.
The following additional properties come into view. These properties determine which document inserts.
AttributeName
DataLink
DataSource
LookupSource
LookupKey
XPathExpression
For more information, refer to Variable objects .
99