What's Query Builder add-on ? And how to use it ? - LabCollector

Search Knowledge Base by Keyword

What’s Query Builder add-on ? And how to use it ?

You are here:
← All Topics

The Query Builder add-on is a powerful tool that allows users to create custom data reports and exports with ease. With its user-friendly visual interface, users can easily design any type of query and apply filters to extract specific or all records from different modules in LabCollector .

The queries created will automatically follow the record links established when data was first entered, making it an incredibly efficient way to generate reports and exports from your LabCollector data. Whether you’re looking to analyze data, create detailed reports, or export data for further analysis, the Query Builder add-on is a must-have tool for any LabCollector user.

In the following knowledge base, we will discuss the capabilities and usage of this add-on.

I) Query Builder

II) Filters

lll) How to execute queries?

I) Query Builder: To create a query, click on the Builder tab located on the top right corner, then on New Query, and finally click on Add first module! to add the first module of your choice (see screenshot below for a step-by-step guide).

A pop-up will then appear, in which you should select the module. Once done, click on save to add it to your query (as shown below).

To delete a module, simply locate the module you wish to delete and click on it. Then, look for the orange trash bin symbol and click on it.

Adding subsequent modules is just as straightforward, all you have to do is click on the first module, then on the blue plus sign . This will bring up a new pop-up window, where you can select the module of your choice from a list of options (just like the one above). Once you have selected your desired module, you will need to link it to the other modules in your query. The appropriate linking mode will depend on the data you are working with. Here’s a list of all existing linking modes for your reference:

  • Normal links: Based on LabCollector generic links made with the Add links button.
  • Custom links: Based on LabCollector links made with Link to another record custom field.
  • Autocomplete links: Based on LabCollector links made with Autocomplete on record name custom fields.
  • Name links: Based on LabCollector data with derivate names.
You can edit the linking mode at anytime, simply click on the module, then on the following black icon .


II) Filters: On the right part, you can add filters to your query. There are 3 filtering methods, which are as follows:

  • A) Filter by value: This filtering method allows you to filter results in a query based on a condition applied to a field of any of the included modules, based on the filter type selected.
    • There are different filter types available to select from in order to filter results in a query:

Each filter corresponds exactly to its name, when it comes to the three last filter types, here’s a quick overview of their functionality :

      • ends with (% LIKE) variable + value : search with variable prefix.
      • starts with (LIKE %) value + variable : search with variable suffix.
      • contains (% LIKE %) variable + value + variable : search with variable prefix and suffix.
    • You can also choose the value type, whether you want it to be the raw value of exactly what you input, or today‘s value, you can also set the number of months before or after today’s date.
Example 1
Below is a screenshot of an example for a filter, that is applied on all samples within the Samples module where the comment field should be equal to “DNA 4”.

Example 2
Here’s another example of a filter applied on all samples within the Samples module where the comment field must contain the word “DNA”.


  • B) Filter by module: This method allows you to search for records with a shared value across two modules, separate from the field that connects them.
The example below shows a filter with the condition that the “comments” field within the Samples module must have an equal value to that of the “volume” field in Plasmids.
  • C) Filter by project code: As the name suggests, this filtering method enables you to filter by the project code, you will have a list of all existing projects codes within your module that you can choose from, as shown in the screenshot below.

Once you have finished setting up your query, you can now give it a name by clicking on the blue icon located on top , then click on (as shown in the screenshot provided).


Be Careful note
Always remember to hit the “save” button after creating or making changes to a query.

To access created queries, click on located on the top left corner. This will display a list of all queries with their title, ID, alongside their creation date, owner, modification date, and expected results (as shown below).

You also have the option to share your query with certain users or groups. To do so, just go to the Queries tab (by clicking on located on the top right corner), then click on located next to the query for which you want to modify its sharing options (as shown in the screenshot below).
You also have the option to copy your queries by clicking on , and delete them, by clicking on . In this case, a pop-up will appear asking you to confirm the deletion (as shown in the screenshot below).
The “Remote URL” function allows you to access your data remotely by generating a unique URL. To use this feature, click on and copy the generated URL that appears. This function can be useful if you want to import your data into an external dashboard software such as Power BI or Qlik.
Ill) How to execute queries?
After creating your query and saving it, go to the Results tab, by clicking on located on the top right corner.
This will display a list of all records that meet the conditions of your query (as shown in the screenshot below).
The time taken for the results to appear will depend on the query logic and the size of your database.
When you click on , you will be redirected to a page in which you can select all the fields from the module of your query (Relevant Modules) that you want to appear in your results. Once you finish, click on then on to return to the Results page. Please note that the selections are specific to the individual user and will not affect other users.
Once you have executed your query, you can export the results in an Excel, CSV, or a JSON format. Please note, that you can also select your preferred separator within the CSV file (either a comma, a semicolon, a tab, or a pipe).

Related topics: