Creating a template

From LabTrove Documentation
Jump to: navigation, search

Templates are blank Posts that can be completed when you record an experiment. A template can be reused again and again. You can use templates to standardise Posts 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 Posts in your E-notebook. Templates can also be used across teams and multiple E-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 Post, except that the value specified for the Section metadata must be Templates. All the templates in your E-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 Post from the template.

When you first create a Post using a template, the text fields that have been added to the template are the only parts of the Post that are editable. Once the Post 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 Post for your new experiment.

Contents

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 Post 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 Post 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 Post the Post 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 Posts 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 Post if required.

To set the Section for the Post use the format [[Section>name_of_section]]. For example, if you want to set the Section for the Post to Spectroscopy you would use the following markup in your template:

  [[Section>Spectroscopy]]

A Post 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 Post from the template.

To add metadata in the form of key-value pairs to your Posts using templates use the [[Metadata_key>Metadata_value]] markup. For example, if you want to create a heading Methods with a value in your Post of TLC, the markup that you would use to add the metadata is:

  [[Methods>TLC]]

You can include multiple key-value pairs in your Post 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 Post 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 Post.

What to do next


Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox
Print/export