Skip to content

Manage templates and fields

In an extraction project, declare templates and fields using the Rules language.

There is no special place for templates and fields declarations, you can put them in any rule file (with extension .cr) and you can distribute them across multiple files as long as all those files are then imported in a main file with the IMPORT statement.

For example the is suggested, because it's the place where Studio puts the declaration of sample templates and fields when you create a project from scratch and, by default, the file contains an IMPORT statement that includes it at compile time.
You can obviously delete or modify the sample declarations depending on your needs.

Classes tool window, Templates tab

  • To go up and down, use the scrollbar and keys.
  • To locate items of interest:
    • In Search enter the search criteria then select Find Next .
    • Review the results in the Find Results window.
    • Double-click the result you are interested in to select.
    • Use Reset to clear the search criteria.
  • To list a subset of items:
    • In the Shortlist column check the items you want to include.
    • In the toolbar choose Toggle Checked List .
    • Use Uncheck All Nodes in the toolbar to restore the original view.
  • To see all the items select Expand All in the toolbar.
  • To see only the first level of the items select Collapse All in the toolbar.
  • To view the fields of a template select the right arrow head on the left of the template name, to hide the fields select the down arrow head.
  • To show or hide the Attributes column select Toggle Attribute Visibiliy in the toolbar.
  • To show or hide the annotations select Show/hide annotations in the toolbar.
  • To refresh the rules and annotations counter select Refresh counters in the toolbar.
  • To automatically refresh the rules and annotations counters after a build operation:
    1. In the Studio Settings window, select Classes under Tool Windows.
    2. Set the Refresh Classes Counters after the build parameter to true.
  • To open the select Open Config File .

Expand and compress fields

To expand the template fields, right-click the template name and select Expand node.

To collapse the template fields, right-click the template name and select Collapse node.

Create a rule based on the selected field

To create a rule based on a selected field, right-click it and select Create rule. A field-based rule structure will appear in the editor.

Export templates and fields

To export templates and fields in a .csv format with information about number of rules and annotations, right-click in the Templates tab and select Templates Report.

In the notification in the lower right corner, select Open file to view the formatted file.

The file will be in the templates sub-folder of the reports folder in the Project tool window.