Maintainly Query Language allows you to query the database based on one or a combination of variables. It's a powerful tool that's handy to know if you want to take your data filtering beyond just the simple scenarios.
There are two methods for using Maintainly Query Language; via the advanced filter, or by typing the query directly into the filter. Both are described below.
Multiple variables can be selected, one after the other from the given options, to drill further down into the data.
NOTE: Some specific examples given here may not be applicable to all interfaces, since the data fields being queried will vary from page to page.
NOTE: Access to some variables may be limited by the organisation's Plan, as well as your individual permission level.
Type your query
Adept, frequent users of filtering may notice & remember the shortcuts that the advanced filter uses (eg. "status:closed"). These shortcuts can be typed directly into the filter which, in essence, is all that the advanced filter is doing for you.
Here are some examples of advanced filter shortcuts:
Text Searches
Simple text searches will return a mixture of results from the various available text fields that are being queried. Things like task titles, comments and the names of users.
Words that are wrapped in double quotation marks (eg. "broken axle") will only return exact matches to what is contained within the quotation marks.
Filtering for multiple words will return results that include both words. It will not return results with either word alone.
Numbers
If a # (number, hash, or pound sign) is entered before a number, only a direct match will be returned.
Qualifiers
A qualifier can be included to refine a search:
Colon - A qualifier using a colon can be used by itself or in combination with a text or number search (eg. fuse archived:true would return materials containing the word fuse that are currently in an archived status).
The in: qualifier can be used to specify the exact field to be queried. For example, acme in:company will search for the company name acme but only within the company field. You can query multiple fields by separating them with a comma, like acme in:company,email.
Dates
Creation and updated timestamps are often recorded. These can be used in the filter via created: and updated: qualifiers.
The following are some examples of date usage:
Relative Date Ranges
created:today - Return objects created today
created:>1y - Return objects created in the last year
created:>4m - Return objects created in the last four months
updated:yesterday - Return objects updated yesterday
updated:>4d - Return objects updated in the last four days inclusive
updated:<1w - Return objects updated more than a week ago
A time value by itself (eg. 4d) should be thought of as "4 days ago".
Explicit Dates
created:>2015-08-14 - Return objects created after 2015-08-14
created:>=2015-08-14 - Return objects created on or after 2015-08-14
updated:<2015-08-14 - Return objects updated before 2015-08-14
updated:<=2015-08-14 - Return objects created on or before 2015-08-14
updated:2015-08-14..2017-12-26 - Return objects updated between 2015-08-14 and 2017-12-26 inclusive. Date positions are interchangeable
Materials
Text searches can be on the following fields:
title
number - Only exact matches if prefixed with a hash #, otherwise matching from the start of the number ie. 123 would return task 123 first, followed by 1230, 1231, 1232.. etc. but never task #4123
internal reference
manufacturer
model
description
Additional Qualifiers:
Type, Unit and Manufacturer are searchable via in: (eg. type:electrical, unit:kg or manufacturer:siemens)
supplier:"Melbourne Electrical Supplies" will return materials supplied by a supplier with a direct title match
Additional Date Qualifiers:
Since materials can also be archived, archived: can be used in combination with a valid date value (eg. archived:yesterday, archived:>1y, updated:<2015-08-14). Results will be based on the date the material was actually archived.
archived:true will return all archived materials.
archived:false will return active materials, however, this is already assumed, so is generally not required.