How to create a new query

To create a new query click on the Queries button in the side bar

image

This will open a pop up and click new

image

Another pop up will open asking you to select the Query type. This is the base table for the query and will be the table in which any results will be viewed. Any query where you want to see the specimen and collecting event information should start with the Collection Object table.

image

Once you have selected the base table the query builder will open with the selected table in the query mapper.

image

From here you can start to construct your query.

Fields from the selected table are in the first part of the mapper, tables that are linked to this table are below these and are distinct in that they have an icon at the start followed by a >

Fields in current table e.g. Specimen Description

image

Linked table e.g. Preparations

image

By adding fields from the various tables you can start to build the query.

To add the selected field click the + button.

e.g. Barcode can be added by clicking on the Preparations table link and selecting the Barcode field from the field list:

image

e.g. The locality can be selected by navigating from the Collection Object through to the Collecting Event and then to Locality:

image image

and then selecting the Filed As field from the field list:

image

It may not always be clear which table to find a certain piece of information in, one way to help determine this can be to look at where on some of the data entry forms the field appears. For example, if you are looking for specimen information you could open the Collection Object form. The headers followed by a green + or a – and + image image indicate that this section or subform is a table, providing some idea of which tables to look up when building a query. Another option is to use the Reference Manual which is being developed to provide a listing of all the fields and the table in which they can be found.

Once the fields have been selected the operators can be used to further refine the search. (more information on the operators is given in ‘The Query Builder’ section.

Remember that to see the information in the results, the field must be selected in the query.

There are additional display options for Queries.

Basic view makes a complex query much easier to work with by hiding the mapping. The Field Mapper can also be hidden.

Query in Detailed View with Field Mapper visible

image

Query in Basic View with Field Mapper Hidden

image

Queries can be saved locally by clicking Save Query

image