Developing filters
In Advanced mode, the following options are available on the Filters tab:
- If you have selected multiple sources, you can select Add Filter to define additional filter rules using the And, And Not, Or, and Or Not connectors. Use the up and down arrows to specify the order in which to apply a filter.
Controlling joins between filters
When you define more than one filter, by default the join uses And, which narrows the results. However, if you add multiple filters on the same object Property (such as StateProvince), by default the filters join with an Or connective, which broadens the results. Therefore, to use the same object Property in an And join, create those filters separately. For example, to define a filter to obtain customer records in Texas and in Virginia, first create one filter (where StateProvince = TX) and then select Add Filter to define the second part (where StateProvince = VA).
- A Multiple checkbox is visible when the filter Property contains a discrete drop-down list of values. Selecting this checkbox changes the Value selector from a simple drop-down list that enables you to select only one specific value to a multi-select control that enables you to select multiple values. The selected values are used as an Or comparison. See Defining a filter property with several values for more information.
- Require the user to provide at least one valid value: User must enter a valid filter value before the query can be run.
📘 Note
Even if the Multiple checkbox is not visible, you can still manually specify multiple values for any filter property by entering a comma-delimited list of quoted values. For example, you could specify the following multiple values for a City property:
"Toronto","Montreal","Calgary"
Adding runtime parameters
In Advanced mode, you can create a parameterized query, which allows (or requires) users to specify a value (such as "state = FL") to narrow their search. This lets other staff members run a standard query, changing a runtime parameter value each time to get the results they need. Such queries are useful for organizations where limited number of users may create the actual queries.
Limiting the rows returned by a query
You can set an advanced filter on a query to set a hard limit or a default value for the number of returned rows.
Do the following to limit the number of rows returned by a query:
- Go to RiSE > Intelligent Query Architect > New > Query.
- (Filters tab) Select Advanced mode.
- Select the Limit the number of results returned option.
- Enter the Value for the maximum number of rows to display.
📘 Note
To create a top n records query result, specify at least one property on the Sorting tab.
Defining a filter property with several values
When a filter Property contains a drop-down list of values, you can select a single value from the list or you can select more than one. The selected values are used as an Or comparison.
Do the following to define multiple values for a filter property:
- Go to RiSE > Intelligent Query Architect > New > Query.
- Enter a Name and add Sources.
- (Filters tab) Select Advanced mode. A Multiple column is displayed between the Comparison and Value columns. For properties that have a discrete list of values, a checkbox displays in the Multiple column.
- Select a property that has a discrete drop-down list of values, such as State Province.
- Select the Multiple option.
- A default Value displays. Browse to select another value.
- From the Available Values list, select the values that you want to use in the filter. You can multi-select values by holding Shift or Ctrl while selecting values with your mouse.
- Click OK. The selected values appear in the Value column.
- Click + to add the filter. You can add additional filters to your query. Additional filters can be reordered using the up/down arrows.
📘 Note
You cannot move filters between filter sets.
Adding dynamic filters to queries
You can dynamically filter your query results using the variables described. The dynamic filters are added to the Value column. If a property contains a drop-down of Values, then you cannot add a dynamic filter to the property.
📘 Note
You must enter the quotation marks where indicated when using the following variables.
- Filter by ContactKey and UserKey properties of a business object:
"@LoggedInUser"and"@Me": Both filter by the currently logged-in user."@SelectedUser"and"@SubjectContact": Filters by the selected contact. The contact is selected based on the contact key passed in the URL parameter. If no contact key is passed in the URL, the contact is considered to be the On Behalf Of contact (if set), or the logged in user.
For example, set NetContact.ContactKey equal to
"@SelectedUser". - Filter by ID:
"@SelectedID": For authenticated users, this variable filters by a selected contact ID. The ID is selected based on the ID passed in the URL parameter. If no ID is passed in the URL, the ID is considered to be the On Behalf Of contact's ID (if set), or the logged in user's ID.
For example, set CsContactBasic.ID equal to
"@SelectedID". - Filter by date properties:
@Date: Filters by the current date.@Now: Filters by the current date and time.
Filtering by a URL parameter
Filter by a URL parameter:
"@url:"Filters by a specified URL parameter. Specify the name of the URL parameter after the colon in"@url:".📘 Note
You must enter the quotation marks where indicated when using the URL parameter.
For example, the event dashboard page includes a parameter in the URL called EventCode. To build a query that uses this EventCode as a filter, add a filter to the query that sets CsEvent.EventCode equal to "@url:EventCode".
📘 Note
If you are building a query for an alert, make sure the Prompt is set to No. This is required in order to avoid the filter from being removed from automated alerts.
| Commonly Used URL Parameters | ||
|---|---|---|
| Page | Parameter | Associated Data |
| Account page (party.aspx) | ID | ID (e.g. CsContact.iMIS ID) |
| Individual events | EventKey | EventCode (e.g. CsEvent.EventCode) |
| Products | iProductCode | ProductCode (e.g. CsProduct.ProductCode) |
| Groups (e.g. Chapters and Committees) | GroupId | GroupId (e.g. SoaGroupMember.GroupId) |
| Engagement | EngagementScoreId | EngagementScoreKey (e.g. EngagementScoreCurrentData.EngagementScoreKey) |
