...
- 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
*since ACD v.3.2 selectperiod filter will receive additional setting "Format of datetime output" which will allow to handle with strings which contain dates in different formats.
Next code will process string with date in format 'YYYYMMDDhhmmss' to the filter:
console.log(start)
console.log(end)
console.log(moment)
const newStart = moment(new Date(start)).format('YYYYMMDDhhmmss')+'Z'
console.log('start', newStart)
const newEnd = moment(new Date(end)).format('YYYYMMDDhhmmss')+'Z'
console.log('end', newEnd)
return [newStart, newEnd]
- selectrange
With this filter you can define a schedule.
...
- selectsearchload. Available from ACD v.3.22
...
This filter will allow to handle with large number of objects matching Search query. Recommended in case if more than 10 000 entries match base filter queryQuerystring.
Contains 3 fields:
- Search field.
- Select field. By default populated with first N records received with basic Search queryQuerystring. Can be repopulated by data received after user will add a string to search in "search" field based on base Search queryQuerystring.
Example: Base search query 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 "Maxiumum 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 Search queryQuerystring, Max Limit, number of loaded records and unique records shown in filter (if "Make Unique Values" is checked in settings).
...
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:
...
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 User`s DN: "cn=ysommer,ou=users,o=data".
This can be pictured as an HTML select option:
<option value="cn=ysommer,ou=users,o=data">Yann</option>
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 value attribute, it only shows the value once.
...
Make Unique Values unchecked:
Make Unique Keys
Check this box in most cases. If there are multiple similar values for the selected key attribute, it only shows the value once.
Sort direction
How do you want to sort the filter values that appear in the filter, asc=ascending, desc=descending
...
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"
Query Reformat Script. 'return input;'
Once selected have to contain 'return input;'!
For versions prior ACD v.3.2 input have to be a string.
Since v.3.2 may return an array of objects with properties {key:keyString, value:valueString}
Next file contains some functions which may be used as is or as examples:
View file | ||||
---|---|---|---|---|
|
Filter dependent filter on value from (available since ACD v.3.2)
Allows to select which attribute to use for filtering of dependent filters.
Available options: Attribute to filter on, Query Keyattribute, Query Valueattribute.
Recipient Surname and Recipient Given Name filters of nrfRequest Report have next settings
Setting Name | Recipient Surname | Recipient Given Name |
---|---|---|
Internam filter name | f_requester_sn | f_requester_gn |
Querystring: | objectClass: inetOrgPerson AND sn:* | objectClass: inetOrgPerson AND givenName:* |
Attribute to Filter on | nrfRequester | nrfRequester |
Query keyattribute | dn | dn |
Query Valueattribute | sn | givenName |
Filter depend on: | - | f_requester_sn |
Filter dependent filter on value from | Query Keyattribute | - |
Report dependent filter on value from | Attribute to filter on | Attribute to filter on |
Filter loaded data dependent on value from | Query Valueattribute | Query Valueattribute |
When "Attribute to filter on", "Query Keyattribute", "Query Valueattribute" have different values like in table above it is important to define which attribute to use for dependent filters and which for resulting report. By default ACD use "Attribute to filter on".
In example when Surname Santos is selected dependent filter uses Query Keyattribute - sn instead of used by default Attribute to Filter on -nrfRequester.
Report dependent filter on value from (available since ACD v.3.2)
Allows to select which attribute to use
Available options: Attribute to filter on, Query Keyattribute, Query Valueattribute.
!Note: Filter must define Either none or both "Filter dependent filter on value from" and "Report dependent filter on value from" settings.
Filter loaded data dependent on value from
Allows to select which attribute to use in "search" of selectsearchload filter
Available options: Attribute to filter on, Query Keyattribute, Query Valueattribute.
In table above for both filters this setting is set to "Query Valueattribute". This means what query will search users with sn or givenName matching substring entered in "search" part of filter.
How to filter pre-loaded data (available since ACD v.3.2)
Pattern for pre-loaded data.
Available options (on example ):
- *KEYWORD (at the begin)
- KEYWORD* (at the end)
- *KEYWORD* (at both)
- KEY WORD* (at the end if not contain space)
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!
...