Server User Guides > Interviewer - Server Admin > User administration > Setting up global filters
 
Setting up global filters
Global filters are user-level or role-level filters that control access to case data in a project. For example, in a company that provides insurance services you might have roles associated with different types of insurance. The Household role might have a global filter that restricts group members to seeing data associated with household insurance such as building or contents insurance; the Personal role might have a global filter that selects only data associated with life and earnings protection insurance; and so on. Alternatively, you might decide to set up filters based on sales regions, so that members of the Eastern sales group can see details about all insurance types, but only for clients in their area.
For any user or role, you can set the same global filter for all projects or you can vary them between projects. Activities that use global filters include Survey Results, Export Data, and UNICOM Intelligence Reporter.
If a user who has a global filter is also a member of a role that has a different global filter, the filter at the user level overrides the role-level filter. If a user is a member of two roles that have different filters for a project, the filters are combined so that he/she sees data selected by at least one of the filters.
Suppose you have the following users and roles:
UserA belongs to Role1 and Role2
UserB belongs to Role2 and Role3
UserC belongs to Role2 and Role4
and you set up the following global filters:
Project Id
User name
Role name
Global filter
ProjectA
UserA
 
Region.ContainsAny({Eastern})
ProjectA
 
Role1
Region.ContainsAny({Western})
 
 
Role2
Region.ContainsAny({Southern})
 
 
Role3
Region.ContainsAny({Northern})
 
 
Role4
NOT Region.ContainsAny({Northern})
When the users access the case data for project A, the following filters are applied:
UserA: the filter is Region.ContainsAny({Eastern})
UserB: the filter is Region.ContainsAny({Southern }) OR Region.ContainsAny({Northern})
UserC: the filter is Region.ContainsAny({Southern }) OR (NOT Region.ContainsAny({Northern}))
Global filters are based on questions in the project's questionnaire script. In the first example, the case data would need to include a question that says what type of insurance the data refers to; in the second example, the case data would need a question that identifies the region in which each respondent lives. The syntax for defining global filters varies slightly depending on the type of question you are filtering on.
Numeric questions
To filter on a numeric question, type:
QuestionName Operator Value
where:
QuestionName is the name of a question in the project's questionnaire file.
Value is a number.
Operator is one of the following:
Operator
Description
=
Equal to
<>
Unequal to
<
Less than
<=
Less than or equal to
>
Greater than
>=
Greater than or equal to
For example, Age>60 restricts the user/role to seeing data for respondents who are older than 60.
Text questions
To filter on a text question, type:
QuestionName Like "Pattern"
where:
QuestionName is the name of a question in the project's questionnaire file.
Pattern is the text with which the data is to be compared. An underscore in the text matches any single character, and a percent sign matches any number of characters, including zero.
For example, Postcode Like "TN%" allows the user/role to access all data for postal codes that start with the letters TN.
Categorical questions
To define filters for categorical questions (single choice or multiple choice responses), type one of the following:
QuestionName Operator ValueQuestionName.Function({Value})
Parameters
QuestionName
The name of a question in the project's questionnaire file.
Value
The name of a response in the question's response list. To specify more than one response name, separate them by commas.
Operator
One of the following.
Operator
Description
=
Selects data that exactly matches the given value.
<>
Selects data does not exactly match the given value.
<
Selects data that contains a subset of the listed answers but not all of them.
<=
Selects data that contains one or more of the listed answers.
>
Selects data that contains all the listed answers and at least one other answer.
>=
Selects data that contains all specified answers, with or without additional answers.
Function
One of the following:
Function
Description
ContainsAll
Selects data that contains all the specified answers.
ContainsAny
Selects data that contains at least one of the specified answers.
Examples
InsuranceType={Household}
gives access to data where the value of InsuranceType is Household and nothing else, whereas:
InsuranceType.ContainsAny({Household})
gives access to data where the value of InsuranceType is just Household or Household and some other type of insurance.
Notes
ContainsAny and ContainsAll are the most commonly used functions for setting up filters, but you can use any function in the UNICOM Intelligence Function Library. If you are unable to set up the filters you want using the methods shown in this topic, refer to the "UNICOM Intelligence Function Library" topic in the UNICOM Intelligence Developer Documentation Library documentation for details of further filtering keywords.
You can create filters that combine two or more criteria; for example, household insurance in the east. To do this, type the two filter expressions one after the other, separated with either "And" or "Or":
And
Both expressions must be true in order for the user/role to see the data.
Or
One or both expressions must be true in order for the user/role to see the data.
The filter for household insurance in the east might be:
InsuranceType.ContainsAny({Household}) And Region={East}
Compare this with:
InsuranceType.ContainsAny({Household} Or Region={East}
which gives access to all household data for the eastern region, but also to all data about household insurance in any region and all data about any type of insurance in the eastern region.
Setting up global filters: Method 1
1 Launch the User Administration activity from the Tools menu.
2 In the left tree, click the Users, Roles, or Projects (under the appropriate customer account) for which you want to define a global filter. If you are not using customer accounts, click Users, Roles, or Projects under the System account. There are various ways of doing this:
3 In the left tree, click Users or Roles (under the appropriate customer account). If you are not using customer accounts, click Users or Roles under the System account.
A list of current user or role members appears on the right-hand side of the page.
4 Select the appropriate users or roles in the left table, then select the Projects tab in the right table. This displays the projects to which the selected user or role is currently assigned.
Setting up global filters: Method 2
1 In the left tree, click Projects under the customer account. If you are not using customer accounts, click Projects under the System account.
A list of current projects appears.
2 Select the project in the left table, then select the Users or Roles tab in the right table. This displays the users or roles to which the selected project is currently assigned.
3 Click Edit (under the Global Filter column) next to the user or role. The Global Filter Editor dialog opens.
4 Type the filter specification, and then click OK.
User Administration checks that the filter syntax is correct, and then adds the filter to the frame on the right of the page.
User Administration cannot check that the question exists in the project or that the value you have entered is valid for the question. If the question does not exist, the user/role has access to all data. If the question exists but the value is not valid, which data the user/role sees (if any) depends on the meaning of the expression as a whole. For example, if the filter is Region={SouthWest}, and there is no such category, no data is available because there is nothing that matches the filter. If the filter is Region<>{SouthWest}, all data is available because all records will have a value other than SouthWest.
If you have a lot of global filters to set up, you might find it easier to import them from a spreadsheet: see Importing users and roles.
Changing a global filter
Follow the steps for creating filters. When you click Edit, the dialog shows the previous filter value. Enter the new filter, and then click OK.
Deleting a global filter
Follow the steps for creating filters. When you click Edit, the dialog shows the previous filter value. Remove the filter value, and then click OK.
See also
User administration