Create a smart query definition from an ad-hoc query
From Analysis, select Information library. The information library appears.
On the Queries tab, select the double arrows next to the ad-hoc query to use to create a smart query definition.
On the action bar, select Create and select Smart query. The Create smart query from ad-hoc query screen appears.
Note: You can also create a smart query from the Ad-hoc query screen when you add or edit a query.
Under Field, each output field selected for the ad-hoc query appears.
From the Output type column, select whether to include, exclude, or hide the output field in the smart query definition.
To apply criteria to limit the results in the smart query, select Filter and choose a filter in the Filter operator column.
When you create a smart query instance based on this query definition, each field you select to filter appears on the Parameters tab of the Smart Query screen with the selected filter operator. For example, if you include Account Number with a filter operator of Not Equal To, the Parameters tab displays an Account Number not equal to field. You can specify which parameter this number should not equal in the query results.
In the Primary key field, select an output field from the ad-hoc query to specify the type of smart query to create. When you select a field, the record type associated with it automatically appears in the Record type field.
We recommend you select a system record ID so query instances created from the definition can uniquely identify records that appear in the results, and so the queries appear in the results of smart query searches.
Note: System record IDs appear as options when you include them as output fields from the ad-hoc query. For example, to create a constituent view smart query, include the Constituent record field.
In the Record type field, select the record type to use as the source view for the definition. If you selected an output field in the Primary key field, the record type associated with it automatically appears. You can search for the query definition based on the record type you select.
Enter a unique name and description to help identify the new smart query.
Select Save. You return to the information library.
To view the smart query definition you created, select Add a smart query. Your smart query definition appears under the selected record type category.