Search on the folder level

Except for Field Sets, objects with the same name may reside in different folders. A folder name can also be used when referring to such an object. But a folder specification never includes top-level folder for these objects, as it is implied.

For example, to insert a Text Block that resides in a certain Text Block folder such as "My Folder," you do not need to mention the top-level Text Block folder name such as "Text Blocks" in the TEXTBLOCK NAME statement: "My Folder" is sufficient.

Absolute path

When inserting an object, you can specify an absolute location placing a backslash in front of the name or path of the object. The backslash comes after a possible project specification.

TEXTBLOCK NAME "\my Text block"
TEXTBLOCK NAME "\folder\another Text block"
FORM NAME "Questionnaires.\customers\order form"

Objects specified in this way are searched only and in that exact location.

Relative path

If an object specification does not start with a backslash, KCM Repository looks for the object in a number of folders that were specified during project configuration. Together, these folders form a search path. By default, the search paths only contain the top-level folder for the object, such as Text Blocks, Forms, and so on.

Text Blocks, Forms, and Text Block Lists have their own search paths. To configure their paths, see Dynamic objects.

Field Sets do not need search paths, as the name of a Field Set is unique within a project.

KCM Repository looks for the object in each folder in the order that they are given in the search path. If the object reference also includes folder names, they are considered to be subfolders of the folder in the search path. Searching ends when an object is found with the proper name and an applicable revision. This object is returned and used.

When a folder is added to the search path, only that folder itself is searched. Subfolders are not included in the search. You can either add the subfolders to the search path or add the subfolder name to the insert statement.

Example Assume that "folder" is present in the search path, but its subfolder "subfolder" is not present. The Text Block "text block" resides in "subfolder." This Text Block will not be found if it is inserted with TEXTBLOCK NAME "text block", as "subfolder" is not searched. However, if you insert the Text Block with TEXTBLOCK NAME "subfolder\text block", it will be found.

Applicable revisions

KCM Repository not only looks for an object with the proper name, but also with an applicable revision. The first object on the search path with an applicable revision is returned. For Master Template run outside of KCM Repository, the object must have a [published] revision to be found.

For example, assume that you have a Text Block "Customer Details" both in the Text Block folder "folder1" and in Text Block folder "folder2," where "folder1" precedes "folder2" in the search path. A Master Template looking for the Text Block "Customer Details" gets the Text Block residing in "folder1," provided that this Text Block has a [published] revision. If not, searching will continue to "folder2," and the Text Block residing there will be retrieved, but only if it has a [published] revision.

Master Template runs started from within KCM Repository (test runs) only require a [draft] revision to exist for an object to be found, or an [in development] revision for objects locked by the user running the Master Template.

Shared projects

When looking for the object in the search path of the project does not succeed, KCM Repository continues looking for it in the Shared projects in the order they are configured in the project and uses the search path of the shared project to find the object.