Creating a template
Templates are blank Entries that can be completed when you record an experiment. A template can be reused again and again. You can use templates to standardise Entries that you use to record your experiments. Using templates ensures that the data you record is consistent across repeated experiments and can also help to make it easier to organise and find Entries in your Notebook. Templates can also be used across teams and multiple Notebooks to ensure consistency in recording. You can also share templates with other groups that are using LabTrove.
You create a template in the same way as an ordinary Entry, except that the value specified for the Section metadata must be Templates. All the templates in your Notebook are added to Templates under Sections in the right hand navigation menu. A template can be configured to contain text fields and tables that you can complete when you write up your experiment. A template can also be configured to contain specific metadata that is used when you create a new Entry from the template.
When you first create a Entry using a template, the text fields that have been added to the template are the only parts of the Entry that are editable. Once the Entry has been saved, it can be edited to change value and add extra text or data. It can be useful to add placeholder text where you intend extra text, images, or links to data to be added later. These placeholders can act as a reminder to include these additions when you create the Entry for your new experiment.
Adding text boxes to templates
To add text boxes for the user to complete to the template you must use the
[[box]] markup. Using
[[box]] adds a text box into which you, or another user, can add a data value later. There is no limit on how much text can be added to one of these text boxes, but you can control the width of the box using a number. In the following example, the box markup includes a variety of widths for the the text boxes:
[[box=1]] [[box=2]] [[box=5]] [[box=10]] [[box=20]] [[box=50]] [[box=75]]
When a Entry is created using the template 7 text boxes are displayed with increasing widths, as shown in the following image.
Use an appropriate width to indicate how much text needs to be entered in the text field. For example, for text fields where you want to enter a measurement, a relatively small size can be used, but if you want to enter a description of a step or product, a larger text field size is more appropriate. For example, this template shows the use of different sizes of text fields for recording the yield of an experiment:
Experiment Code: [[box=10]] Date of Experiment:[[box=10]] The yield of the reaction was [[box=6]]mg with a formula mass of [[box=6]]g/mol. Starting material ([[box=30]]) was [[box=6]]mg with a formula mass of [[box=6]]g/mol. Yield is calculated as: ([[box=6]]/[[box=6]])X100=[[box=8]]
When a Entry is created using this template, the text fields are displayed with a variety of appropriate sizes based upon the input that the user is likely to enter, as shown in the following image.
Adding tables with text boxes to templates
To simplify data entry you can also add text boxes in a table format using the box markup inside table markup. The following example shows a simple table in a template:
[table] [mrow]State:[col]NMR Solvent:[/mrow] [row][[box]][col][[box]][/row] [mrow]TLC Characteristics:[col] Recrystalize From:[/mrow] [row][[box]][col][[box]][/row] [/table]
When the template is used to create a Entry the Entry contains text fields to complete for each section in the table, as shown in the following image.
Adding metadata to templates
You can specify the metadata to be used for Entries created by a template for both Section and key-value pair types of metadata. These values can be changed by the user of the template for their specific Entry if required.
To set the Section for the Entry use the format
[[Section>name_of_section]]. For example, if you want to set the Section for the Entry to Spectroscopy you would use the following markup in your template:
A Entry can only have one value for Section assigned to it, so if you include more than one value for Section in the markup, only the final value is used when you create a Entry from the template.
To add metadata in the form of key-value pairs to your Entries using templates use the
[[Metadata_key>Metadata_value]] markup. For example, if you want to create a heading Methods with a value in your Entry of TLC, the markup that you would use to add the metadata is:
You can include multiple key-value pairs in your Entry and you can therefore defined multiple values using this style of markup in your template. Each key can only have a single value assigned to it, so if you include the same key more than once in the markup, only the final value set for the key is used when you create a Entry from the template.
You can add the markup for Section and key-value pairs anywhere in the template, but you might find it easier to locate and edit the values if you add them at the beginning or end of the Entry.
What to do next
- Learn to create your own Notebook entries, see Creating eNotebook entries.
- To find out more about formatting a Entry, see Formatting an eNotebook entry.
- To find out how to add special and accented characters to your Entry, see Using special characters.
- To find out how to use metadata effectively in your Notebook, see Using metadata
- Using a template.