Filter (definitions)
Filter definitions let you filter the data for your report. BUT there are two completely different type of filters, that have a different purpose:
- select filters
- hidden filters
Select Filters
Select filters are filters, that are displayed when generating a report, to select specific objects you want to put on your report.
Select filter types are:
- search
- select
- selectsearch
- selectperiod
- selectrange
- selectsearchload (will be added in ACD v. 3.2)
Select filters are shown in the filter selection when generating the report.
For a filter definition you have a lot of options available. Here only the most important options will be explained
Filtertype
Select type of filter you want to use. There are 5 (6 since v. 3.2) different filtertypes:
- search
Enter a search string you want to select a specific attribute value. You have to enter the exact value. Substring does not work. It makes most sense for 1-5 character filters. e.g. for employee type like i=internal, e=external, p=partner etc., - select
A select box displays all available values of the attribute. You can select no or as many value(s) from the list as you like. - selectsearch
A select box displays all available values of the attribute. At the top you have a search box to search for specific values. Substring search das work. You can select no or as many value(s) from the list as you like. - selectperiod
For date/time fields to select a period. A date/time range select box will appear as soon as you - selectrange
With this filter you can define a schedule.
- selectsearchload. Available from ACD v.3.2
This filter allow to handle with large number of objects matching Search query. Recommended in case if more than 10 000 entries match base filter Querystring.
Contains 3 fields:
- Search field.
- Select field. By default populated with first N records received with basic Querystring. Can be repopulated by data received after user will add a string to search in "search" field based on base Querystring.
Example: Base Querystring defined in filter is: "objectClass:nrfRequest AND nrfSourceDN:* AND nrfRequester:*". With "re" in "search" field "select" field will be populated with records received from elasticsearch using next query: "objectClass:nrfRequest AND nrfSourceDN:* AND nrfRequester:* AND nrfSourceDN:*re*". Attribute in added query part and '*' placement may be changed using new settings "Filter loaded data dependent on value from" and "How to filter pre-loaded data"
- Field with selected records.
Main feature - this filter makes a new query to Elasticsearch on search instead of searching on results preloaded on filter creation. This also allow to set "Maximum Size of Records to retrieve" less than for selectsearch filter and increases performance.
In ACD v.3.2 select, selectsearch and selectsearchload filters will receive additional element on the bottom of the filter containing information about total amount of records matching filter`s Querystring, Max Limit, number of loaded records and unique records shown in filter (if "Make Unique Values" is checked in settings).
In example we see that filter loaded only 10 000 of 34 292 records available. In such cases recommended to use selectsearchload filter!
Template
Select template to use for displaying the filter. By default we use the same template as the filtertype. If you do not specify a template the filter will not appear!
Internal Filtername
Define an internal name for the filter. You need this internal filtername if you define dependencies on filters.
Filter Title
This is the filtername as it appears in the filter dialog.
Attribute to Filter on
Define the name of the attribute you want to define a filter on. If you do not know the name of the attribute please refer to fields and alias.
Fields and Aliases - SKyPRO Products - Collaboration
Value to Filter the Attribute
Leave it blank for none hidden filters! May contain regexp to filter values. Example: regexp /1|3/ will leave only records where attribute value is either 1 or 3.
Querystring
Enter a querystring if you want to make a preselection of all attribute values that are available in the filter. e.g. In a user report you only want to select users that are in a subcontainers of ou=users,o=data, you can enter the following query in a filter of the attribute parent:
This querystring will prefilter to show only containers in subtree ou=users,o=data where objects of objectclass inetOrgPerson reside. Therefore this filter will only present the containers shown below. Nevertheless there are some more subcontainers in ou=users,o=data, but these containers do not hold any object of objectclass inetOrgPerson.
Query keyattribute
Add the same attribute name as in field Attribute to Filter on. (in simple cases)
* contain attribute which value will be set as "Key" of selected option and used as value in resulting report query.
Query Valueattribute
Add the same attribute name as in field Attribute to Filter on.(in simple cases)
* contain attribute which value will be set as "Value" of selected option and displayed to user.
- nrfRequest report is based on objects with objectClass:nrfRequest. This objects have attribures like nrfRequester, nrfTargetDN and nrfApprovalInfo(in custom case of Scwarz Group) which contain a DN of Users. To implement such a report and filter reports using Surname and givenName all three settings Attribute to Filter on, Query keyattribute and Query Valueattribute must contain different values.
In example "Approver 2 Given Name" filter have
- Attribute to Filter on: nrfApprovalInfo,
- Query keyattribute: dn,
- Query Valueattribute: givenName
- Querystring: "objectClass: inetOrgPerson AND givenName:*" - Users who have givenName.
Selected value is "Yann" which is a givenName. And on the bottom of the filter displayed selected key -it is "cn=ysommer,ou=users,o=data".
Accordingly on report creation ACD will send a query containing Must statement with attribute name from Attribute to Filter on {"query_string":{"query": "nrfApprovalInfo: (\"cn=ysommer,ou=users,o=data\")"}}
Make Unique Values
Check this box in most cases. If there are multiple similar values for the selected attribute, it only shows the value once.
e.g. If you define a filter on givenName and you have multiple users with the same givenName, the givenName will only appear once.
Make Unique Values checked:
Make Unique Values unchecked:
Sort direction
How do you want to sort the filter values that appear in the filter, asc=ascending, desc=descending
e.g. givenName filter sorted descending.
List of Filter we depend on
You can make filters dependend on other filters.
BUT: Only select filters you can make dependent on other select filters! Hidden filters can NOT be used!
e.g. for your user report you only want to be able select users from subcontainers ou=users,o=data. You define a filter on attribute parent as described above in querystring definition. Subsequent filters like lastname (sn) and givenName you want to make dependend on what you select in the parent filter. You only want to show lastnames and givenNames of users in the container you have selected in the parent filter. In that case you have to make the filters on attribute sn and givenName dependent on the filter defined for the attribute parent.
Below you see the filter on attribute parent, named f_parent with the appropriate querystring:
In the filter definition of sn and givenName you add the filter f_parent to make these filters dependend on the f_parent filter
The result is as you click on a specific container in the parent filter the available values in the dependend filters sn and givenName show different values. Only sn and givenName that are available in the selected container.
If you select container ou=IG
If you select container ou=KSSG
If you select container ou=custom
If you select ou=extern
You can even cascade the filter dependencies. So you can make the filter on givenName (Firstname) dependend on what you select on filter sn (Lastname). So if you select a specific lastname only firstnames will be shown of users that have the selected lastname.
To reach this goal make filter givenName (internal filtername e.g. f_givenName) dependend on filter surname (using the internal filtername e.g. f_sn) AND on parent filter (f_parent)
The result will look like this if you select e.g. "Meier" as lastname. There are three users with lastname "Meier": "Stafan Meier", "Max Meier" and "Franz Meier"
Hidden Filters
Hidden filters do not show up in the filter selection when generating the report. So hidden filters have NO EFFECT on select filters even if you make select filters dependent on hidden filters!
Hidden filters are used mostly if users want to generate a report but do not want to or should not make further filtering. So all filtering for the report is predefined and the report will be generated without further interaction for filtering.
If you nevertheless define select filters on a report that has hidden filter(s), you have to add your hiddenfilter(s) to each select filter in the querystring expression. Otherwise in your select filter(s), values will appear from objects, that will not show up in the report (hidden filters have NO EFFECT on select filters!). This is because the hidden filter(s) are applied after the select filters.