Queries

In this article

You'll learn how to use queries to quickly group documents with similar properties

So that you can put those documents in tables, boards, or timeline views. 


Welcome to Delibr's query feature! This feature allows you to group documents that match certain criteria. 

The query feature allow you to search for documents using document properties, such as document type or document owner. 

How to create a query

1. Click on the plus sign in the sidebar and choose "New query". 
2. Specify your Delibr Query Language (DQL) query in the input field. More on this further down. 
3. The query will return all matching results in a regular list view. You can now change view (to a board, table, or timeline), rename the query, edit the query, etc.

Delibr Query Language (DQL)

The DQL is our internal search language that is used for creating queries. As of now the DQL only supports single-select document properties and document links. This means that if you tag documents with a single-select property you are able to create a query that finds all documents with that property, and if you have a document that contain links to many other documents, you can create a query that fetches all the linked documents. 

Single-select property queries

The basic DQL formula for a single-select property is: 

"Name of the document property" = "Document property option"
	

Note that lower and upper case matters when writing the DQL formula. 

If we assume that we have a single-select document property called "Document type", which in turn has an option called "Experiment", then we can create a query that will fetch all documents that are tagged as experiments by writing: 

"Document type" = "Experiment"
	

You can also build more sophisticated queries by adding AND between two formulas. As an example, you might want to query for all experiment documents you have, but only show the ones that are tagged as "Done". The query would then be written as:

"Document type" = "Experiment" AND "Experiment status" = "Done"
	

Linked documents queries

If you have a document that has links to other documents, then you can use the “Linked from” query to fetch all the linked documents. The basic DQL formula for this is: 

“Linked from” = "DocumentId"
	

As an example, if we have a document with the full URL https://app.delibr.com/app/usPDEfnRphqbiapHHT/documents/HDbJnzMoLSExk8BYw, we can create a query that takes all the documents that are linked from this document by writing DQL query like this: 

“Linked from” = “HDbJnzMoLSExk8BYw”
	

Note that the DocumentId above is the last part of the URL. The last string is always the document ID.

An example to put it into context

You and your colleagues are using Delibr documents to flesh out initiatives for the next quarter. You are using the OKR framework, meaning each document is mapped to a specific objective. Depending on the situation you want to be able to have all the initiatives that you are working on in a single view (e.g. a roadmap), but sometimes you only want to see the ones that map to a certain objective (e.g. a prioritization table).

Let's create the query that fetches all the initiatives that belong to the next quarter first. For this to be possible, we need to have these single select properties:

  • We need to be able to tag our documents as initiatives
    • There is a default property type called "Document type" which all teams have. One of the options that this property offers is "Solution". You may use this property type and option, or create a new one. In this example, we will use the default property and the option "Solution". 
  • We need to be able to tag which quarter the initiative relates to
    • There's no default property type for this, so we need to create one. Go to your Team settings & members menu and create a new property called Quarter (or similar). 

Now we are ready to create the query. However, you also need to make sure that all the relevant documents are tagged correctly, otherwise, the query will not bring back any results. 

This is the query we would use to fetch all documents that are initiatives (Solutions) and that are mapped to the next quarter (q2)

"Document type" = "Solution" AND "Quarter" = "Q2"
	

Now, let's create a query that fetches all the initiatives that belong to the next quarter and that are tied to a specific objective. For this to be possible, we need another document property as well: 

  • We need to be able to tag which objective the initiative is tied to
    • Go ahead and create a new property, and add the objectives as options. We recommend calling the property something along the lines of "Objectives Q2".

Now, you can create a query that shows all the initiatives that are coming up in Q2, and that is mapped to a specific objective.

"Document type" = "Solution" AND "Quarter" = "Q2" AND "Objectives Q2" = "Improve the signup experience"<br><br>
	

Still need help? Contact Us Contact Us