Managing and Editing Templates
Templates are created and modified in the Input and Report Template management view (task ID: SheetMnt). The input and report template management functions are available for users with administrator rights.
It is not recommended that several users use the same management function at the same time.
On the template management screen, you can arrange input and report templates using folders. You can also copy an existing template to be used as the basis of a new one. It is possible to attach XML definition and Excel workbook files to the template. You can attach the same definition file to different templates, but note that if you make changes to the definitions in one template, the changes will not be automatically updated to the other templates.
Managing Templates
Location: Input and Report Templates (task ID: SheetMnt)
Although you can create your own templates from scratch, usually the most practical way of adding a new template is making a copy of an existing one which is similar to the template you want to create. After copying, you can edit the copy. The system includes a set of default input and report templates covering the basic needs for data entry and reporting (see Basic Input and Report Templates). In these instructions, another set of example templates is used to illustrate various template features one at a time. For a list of available example templates, see Example Templates. The example templates are also included in the system.
The Clausion installation includes a set of default BW templates and example templates. It is not recommended that you modify these templates, as your modified versions will be replaced by the default templates in the next version update. However, you can copy a default template as the basis of your own template.
Adding a template
In the template and folder hierarchy tree, select the position where you want to add a new template or folder. You can add templates and folders under folders, but not under templates.
Click
and type an ID for the template or folder.
To copy an existing template to be used as the basis of a new one, click
Copy as New.
From the Template type drop-down list, select the item type: Folder or Template.
From the Template position drop-down list, select the position of the template or folder in relation to the currently selected folder. This drop-down list is available if you selected a folder in the template/folder hierarchy tree (see step 1). The possible options are Sub-level and Same level.
Click OK. The new template or folder is added to the tree.
-
Select the template or folder in the list and complete the settings:
In the Name fields, type a name for the template or folder in the languages used in the system (optional but recommended).
Attach an XML definition file to the template: Click Attach under Files and select the file you want to use with the template. You can attach the same definition file to different templates, but note that if you make changes to the definitions in one template, the changes will not be automatically updated to the other templates.
-
Attach an Excel workbook to the template: Click Attach under Files and select whether you want to use an existing workbook or attach a new workbook to the template:
Use existing workbook: Select from all workbooks that are currently in use in the system. You can use the same workbook in different templates.
Attach new workbook: Browse for the file to be attached, or type the path and file name to the Source field. You can change the workbook name.
Click Add.
In the Description field, you can type a description for the template or folder.
When completed, click Save
to save the changes.
Moving and removing a template
You can drag and drop templates and folders to new locations in the hierarchy. Templates and folders can only be moved under folders, not under templates. You can also move templates and folders up and down using arrow buttons (Move down) and
(Move up). With the arrow buttons you can only change the order of the templates or folders on the same level.
To remove a template from the hierarchy, click in Templates not in use. To move a removed template or folder back to the hierarchy, click
.
Errors and warnings
If any errors occur when adding templates and folders, a warning icon and a link is shown in the upper left corner of the Input and Report Templates view.
To view the list of errors and their descriptions, click the link.
To copy the error/warning texts to clipboard, click Clipboard in the Errors and Warnings dialogue box. All errors/warnings in the list are always copied.
The errors and warnings list remains in the view until you clear the warnings. Select the errors/warnings you want to clear and click Clear Selected. To clear all errors/warnings, click Clear All.
Downloading definition files and workbooks
Location: Input and Report Templates (task ID: SheetMnt)
Click
Save Definition as File or
Save Workbook as File.
Select the location where you want to save the definition file or workbook and click Save.
Editing Templates
Location: Input and Report Templates (task ID: SheetMnt)
The Clausion installation includes a set of default BW templates and example templates. It is not recommended that you modify these templates, as your modified versions will be replaced by the default templates in the next version update. However, you can copy a default template as the basis of your own template.
The XML structure of the template is shown as a tree structure in the left hand side pane of the window, and the workbook view on the right.
Starting from Clausion version 22.06, editing of the workbook is no longer possible in the Desktop Client. The workbook must be edited in Excel and attached to the template as instructed in Managing and Editing Templates.
To edit a template:
In the template and folder hierarchy tree, select the template you want to edit.
Click
Edit Template.
A new window opens showing the XML structure of the template in the left-hand pane and the workbook in the right-hand pane.
Editing XML Definitions
Location: Input and Report Templates (task ID: SheetMnt)
This topic describes editing of XML definitions in Clausion. If you choose to modify the XML definitions in an editor outside Clausion, remember to attach the definitions file to the template after modification.
In the input and report template editor, you can change and save only the XML definitions. Modifications to the workbook Excel file must be made in Excel. If you make changes only to the XML definitions file, the save function saves also the workbook (.xlsx). This may result in undesired changes to the workbook file. If the workbook file has been maintained in Excel, saving in the application can change, for example, area names.
Constructing of the XML file is made easy with a list of built-in actions (Delete, Copy, Insert) as well as of eligible sub-elements, attributes and values available in the XML editor. Select an element in the tree, click the element with the right mouse button and select the desired action from the pop-up menu. See the following figure.
Adding new elements
-
Select the position where you want to add an element.
Click the element with the right mouse button and select
Insert from the pop-up menu.
Click
Insert on the Tools tab and select an element from the pop-up menu.
The pop-up menu contains the elements that can be added to the next level of the currently selected element.
When you add an element, the mandatory elements under it are added automatically.
You can also copy elements:
Select the position where you want to copy an element.
Click the element with the right mouse button and select
Copy from the pop-up menu.
Click
Copy on the Tools tab.
-
Select the datacolumns where you want to paste the element to. Click Paste on the Tools tab.
You can paste the element also to a different area or sheet.
The system includes some predefined example settings (for area and datacolumn). Click with the right mouse button where you want to add the settings, select
Add Example from the pop-up menu and select the settings you want to use (alternatively: click
Add Example on the Tools tab). Adding example definitions and editing them to suit your needs is often a practical way to get correct definitions made quickly.
If the XML schema allows, you can move elements to different locations. When an element that can be moved is selected, the (Move up) or
(Move down) button appears in the upper right corner above the element tree.
Editing element and attribute values
The values of the elements and attributes are shown in brackets after the element or attribute name in the tree. When you select an element or attribute in the tree, the value is shown in the lower pane under the tree where you can edit it.
Type the desired value in the value text field. If you try to enter an invalid value for an attribute, the warning icon is shown next to the field. Move the mouse cursor on the icon to view the error message.
If an attribute has fixed options, select an option from the drop-down list.
Deleting an element
Select the element that you want to delete from the tree.
Click the element with the right mouse button and select
Delete from the pop-up menu.
Click
Delete on the Tools tab.
The element has been removed from the tree.
Editing Workbook
Starting from Clausion version 22.06, editing of the workbook is no longer possible in the Clausion Desktop Client. The workbook must be edited in Excel and attached to the template as instructed in Managing and Editing Templates.
Earlier, the basic functions of the workbook on the Home and Tools tabs, including cutting, copying and pasting, text alignment and font formatting, worked both in the sheet and in the xml structure. Now most of the functions and the entire Tools tab have been removed. Starting from Clausion version 22.06 the workbook sheet is protected. This means that if you try to edit the sheet in Desktop Client, a notification "You cannot modify the sheet because the sheet is protected." is displayed. Copying from the sheet and pasting through the clipboard to some other program is still possible. Name Manager displays the definitions but the editing functions have been removed. You can search for text in the workbook using the Find function.
Find
Location: Edit Template >Home
You can search for text in the workbook using the Find function:
Click
(Find).
In the Find what field, type a search term.
-
Select the search options you want to use:
Match case: lower and upper case characters to be taken into account in the search.
Match exactly: the search must be an exact match to your search text.
Alternate search (down then across): the search is run by columns. If this option is not selected, the search is run by rows.
Use wildcards: You can use wildcards (for example *) in the search.
Click Find. The first cell that matches your search is selected. To move to the next match, click Find again.
Name Manager
Location: Edit Template >Home
You can view the names for cell ranges, functions, constants, or tables in the workbook in Name Manager. Click Name Manager.
Starting from Clausion version 22.06, editing of the definitions in Name Manager is no longer possible. For example, you can view the ACCCODE and AREA definitions in the input and report templates, but you cannot edit them.