Pro Tip: Query Ordering in Dovetail Agent
When viewing queries in Dovetail Agent, they’re ordered alphabetically.
I was recently asked if there was a way to change the ordering. For example, I may have a certain query that I always want to be at the top of the list.
Nope, sorry. They’re alphabetical.
But, you can use a few tricks to get the ordering you want.
A-Z
Purely based on letters, if we want something at the top of the list, we could have its name being with “a”, or prefix it with “aaa” . Similar for “zzz”
Reminds me of those businesses that would name their companies so that they would be first in the phone book:
I’m not a big fan of this approach, but it does work. But we can do better.
0-9
Of course, we can also use numbers, which get ordered before letters
Special Characters
Now here’s where we can get clever. We’re not limited to 0-9 and A-Z. We can also use special characters.
! and # and * will be ordered before numbers and letters.
| and ~ characters will be ordered after letters
It works, although it can look a bit ugly if you start using a bunch of different characters as prefixes.
Spaces
My favorite trick here is using leading spaces, which push the query to the top of the list. The more leading spaces, the higher in the list it appears.
Dividers
Here’s another little trick – you can create dividers or separators between groups of queries.
For example, I have my most common queries positioned at the top, and I want something that visually separates them from the rest of my queries.
A query named as a row of dashes will do the trick.
And I’ve set that query up so that it returns nothing, just in case I click on it by accident.
I’ve set mine up to be: Id is Equal to –999 and Item Type = Case
That query is quick, and it will always return nothing (since I’ll never have a case whose case id is equal to – 999).
Putting it all together
Here I have:
- my really favorite queries at the top (using leading spaces)
- a divider
- my favorite queries
- a divider
- my least favorite query
Summary
There you go – a few tricks for hacking the order of your queries in Dovetail Agent.
Hope you found this helpful.
Rock on.