Creation Constraints

Creation Constraints are preset file formats for files in a folder as well as a skript which is executed whenever a file is created in a folder. These constraints can only be defined for folders. You might, for example, want to define that in folders based on the Press format only files based on the Press release and Short news formats may be created. By means of the creation check for files in the folder you can additionally make sure that a file is only created if particular conditions are met, for example, if the maximum number of files in the folder has not been reached yet.

There are two ways for opening the form in which the creation constraints can be defined. If you are about to create a file format, click on the Creation Constraints button in the File Creation Options and Workflow area in the corresponding form. However, if you would like to define or modify the constraints in an existing file format, localize the file format first in the File Formats section using the search function. Click on the file format name in the list item to open the view page of the file format and there on the Edit button to switch to the editing form for file formats. Here, click on Creation Constraints button in the File Creation Options and Workflow area of the form to open the corresponding form.

Valid File Formats for Files in the Folder

For a file format that defines files of type Folder, you can determine which file formats the subfiles of this folder may be based on. You can determine several valid subfile formats. To do this, you can click on the Add button. This opens the selection page for file formats in which you can use the search function to find the desired file format. The Content Manager moves the name of the desired file format to the Valid formats for subfiles list when you click on the name of the file format in the corresponding list entry. Repeat the process for all the file formats to be moved to the list.

If you would like to remove a file format from the list, mark the desired format and click on the Remove button.

If no file formats are specified, subfiles may be based on any format.

Creation Check for Files in the Folder

If you define a file format of the Folder type, you can enter Tcl code in the Creation Function for Subfiles field. This code is then processed by the Content Management Server every time a subfile is to be added to a folder. The Content Management Server only creates the file when the code has set the result variable to a value not equal to 0 (zero). If the code is called by the Content Management Server, the objId variable is set to the file ID of folder containing the file, and the name of the file format on which the new file is based is stored in the subObjClassName variable. result has the preset value 1. Write operations are not permitted in this and other functions.

Please confirm the changes by clicking the OK button.