Saved Queries allow users to save search criteria and additional formatting options to keep your data just the way you like it.
What are Saved Queries
Saved Queries are capable of saving the following information so you can quickly return to, or even set default, views for tables.
Search Filters
Sort Directions
Visible/Hidden columns
Column Order
Column Sizes
For example in the below screenshot we have a saved query applied for the Environment History Report called Production. This Saved Query applies a filter on Environment for “prod“ and sorts on the Requested On column.
By default, the last Saved Query we were viewing on a page will be restored when coming back. Meaning this Production query will be applied to this page indefinitely.
Creating a Saved Query
In order to create a Saved Query perform the following:
1️⃣ Apply any filters, sorts, or column altering you would like to be saved.
2️⃣ Click on the Select a saved query dropdown and click the Create Saved Query button.
3️⃣ This will open a popup where you can provide a name for your Query as well share it and/or create an automated export.
At any point, we can now return to this table and easily apply this Saved Query.
Sharing a Saved Query
A Saved Query can be shared in 2 ways:
Sharing with specific groups
Any user a Saved Query is shared with can select it, view it, and optionally subscribe to it (see below).
Global Share
Checking the global option for sharing will share it with all FlexDeploy users. This will also disable the Group Share since it becomes redundant.
Once a Saved Query is shared it will show up in separate Shared With Me section in your list
What can users do with a Shared Saved Query?
Once a Saved Query is shared, non admin users will be able to view and subscribe to the query but they will not be able to modify it in any way.
Admin users on the other hand can edit and modify it as well.
Automating Saved Query Exports via Subscriptions
Certain views, such as Reports, allow configuring Saved Query Subscriptions (automated scheduled Exports available in CSV or PDF format). There are a few configuration options for subscriptions that are outlined below:
Allow Subscriptions
Before you or users the Saved Query is shared with can subscribe, subscriptions must first be enabled by the owner or an Admin the Saved Query is shared with.
Format
The format of the export, available options are csv and pdf. Note PDF has a 15 column limit.
Cron Schedule
The cron schedule will define how frequently the export is sent out to all subscribers.
Relative Datetimes in Subscriptions
Under most circumstances it is beneficial to add a Relative Date Time filter to your Saved Query that aligns with your Cron interval. This ensures the export will only contain new rows since the last time the export was sent.
This can be done by using the Relative option on any datetime field.
With Subscriptions allowed for the Saved Query, users can subscribe by clicking the button on the Saved Query. Admins will see the subscribe option available in the Edit Popup.
Modifying a Saved Query
1️⃣ In order to modify a Saved Query it must first be selected.
2️⃣ With the Query selected, modify the filters, sorts, and columns as you normally would.
Notice the undo/save buttons that appear. This indicates changes have been made to the query.
3️⃣ Click on the Save Icon to save your changes.
Alternatively you can also undo the changes by clicking the Undo Icon to the left. This will reset the Saved Query to its original state.
Pro Tip
You can easily duplicate queries by simply selecting the one you wish to copy and then clicking the Create Saved Query button again and providing a new name.
Recommended Reading
Take a look at the Data Table documentation to learn how to get the most out of Saved Queries.
FAQ
Can you share Saved Queries?
Yes! Since @8.0.0.0 Saved Queries can be shared with 1 or more groups via the Create/Edit popup.
My Query shows as dirty even after undoing changes
Sometime this can occur between releases if the column names change. In this case you can freely save the query updates to accept the new column name.