List Queries
You can base a list on an existing group of records from a static or dynamic query, or add and exclude query results within a list. This lets you reuse predefined selections instead of building filters from scratch.
Query Options by List Type
This table shows which query options are available for each type of list.
|
Option |
Constituent Lists |
Gift Lists |
Action Lists |
Opportunity Lists |
|---|---|---|---|---|
|
Create a list from a static or dynamic query |
Yes |
Yes |
Yes |
No |
|
Create a managed list |
Yes |
No |
No |
No |
|
Add or exclude records |
Yes |
No |
No |
No |
|
Edit a query filter |
Yes |
Yes |
No |
No |
Note: You can't create an opportunity list from a query or filter one by a query because the database view has no Proposal query type.
Create a List from a Query
Create a list from an existing group of records when you want to reuse predefined selections instead of building filters from scratch. You can base a list on a static or dynamic query or, for constituent lists, a managed list.
-
Go to the type of list you want to create:
-
For a constituent list, from Constituents, select Constituent lists.
-
For a gift list, from Gifts, select Gift lists.
-
For an action list, from Portfolio, select Action lists.
-
-
Select Add.
-
Select Create from query.
-
Select the query. Only a query that matches the selected record type appears — for example, a constituent query for a constituent list.
-
To narrow results, select a query type or format.
-
To view only queries you created, select My queries only.
-
-
Select a query.
-
If you selected a dynamic query:
-
If the query uses an <Ask> operator, a message tells you the query isn't supported for lists. Select Select a different query to choose another query, or Cancel to stop.
-
Otherwise, select Start from dynamic query to continue, or Cancel to return to the previous screen.
Note: Records in a list based on a dynamic query refresh automatically. The system reevaluates records every 30 minutes and after you update the query. Complex or large queries can prevent the list from loading — if a query takes more than 60 seconds to run, use a static query instead, and refresh the page if it doesn't load right away. <Ask> operators aren't supported in lists; use a query without an <Ask> operator. To avoid permissions issues, make sure the query allows other users to run it.
-
When you open or refresh a list based on a query, it automatically updates with any saved changes to the query. For a list based on a dynamic query, the list only re-runs the query if it's been 30 minutes or more since the query last ran; otherwise, the list shows the results from the last run.
The list saves a reference to the source query, and the source type appears in the list's properties.
For constituent and gift lists, you can edit, replace, or remove that query directly from the list's filters, without leaving the list.
Tip: To work with a list based on a query, the underlying query must be accessible to you. Issues occur if you don't have permission to the query or if the query has been deleted.
Edit or Remove a Query Filter
For constituent and gift lists, if you have rights to edit query filters, you can add a query as a filter, then edit or remove it without leaving the list. Select Filters and select Query, then search for and select a query. The list updates to show only records included in that query.
-
To stop filtering by the query, remove it from the list's active filters. To switch to a different query, select Filters and select Query again.
-
To change the query's criteria directly from the list, select the query filter, then select Edit query next to the selected query. This opens the query in the query editor, where you can update its criteria and save your changes. This option is unavailable if you can run the query but don't have rights to modify it.
What you can do with a list's query filter depends on the Edit query filter permission on your role and the rights set on the query itself. This permission doesn't change who can run a query. To change a query filter, you also need rights to run queries, and the query must allow others to run it.
|
Your access |
What you can do with the query filter |
|---|---|
|
Your role doesn't have Edit query filter, and the query allows others to run it. |
The list loads and you can use it, but the query filter is locked and shows a lock icon. You can't add, remove, replace, or edit it. |
|
Your role has Edit query filter, the query allows others to run it, and you don't have rights to modify the query. |
You can remove the query filter or replace it with another query you can run. You can't edit the query's criteria. |
|
Your role has Edit query filter, the query allows others to run it, and you have rights to modify the query. |
You can remove or replace the query filter, and edit the query's criteria from the list. |
|
You don't have rights to run queries, or the query doesn't allow others to run it. |
The list doesn't load. |
Note: If a list is shared, saving a change to its query filter updates the list for everyone who opens it, not just for you.
Note: You can't apply a query filter to a list that's filtered to a static set of records. <Ask> operators aren't supported.
Tip: Don’t see Query under Filters, or can't remove or replace an applied query filter? Contact your system admin for rights to edit query filters.
Add or Exclude Queries in a List
To add or exclude queries to a list, select Add/Exclude. Select whether to add or exclude, and search for the query. Queries may be static or dynamic.
Note: After records from a query are copied into the list, any changes to the query won't affect the list. For example, you can start a new list from a static query, but once the list is created, you can add or exclude records using either static or dynamic queries. Queries only affect the list at the time they're used. If you reuse a query later, you will only add new records to the list, not remove old ones.
<Ask> operators for queries are not supported.