Filtering for module links

Prev Next

It is possible to define filtering rules for module link in field definition settings on the new tab “Filtering” in order to limit the list of available options according to the value specified in other field. A set of rules can be added and chained using “AND/OR” logic. It is possible to create, edit, delete rules that are represented by two selectboxes: “Fields in linked module” and “Filter by”, similarly to “Default value” settings.

image143.png

Fig.: Filtering configuration window for module link fields

The rule for filtering can be defined using these two selectboxes by comparing the content of the fields mapped in them.

  • Fields in linked module selectbox contains the list of fields available by the module link that is currently being configured (i.e. the fields of the linked module). It gives the possibility to define which field in linked module we want to compare with in order to find values that match the criteria and will be shown in the module link field.

  • Filter by selectbox contains the list of fields from current module, the chosen field will be used as a “trigger” for filtering. Possible to select “Current user” option that can be used for filtering module link with a currently logged in user (if module link points to the module with users) or “Current user groups” option that means all users who have the same groups as the current one. Also it is possible to use static values for filtering by selecting the “Static value” option.

The mechanism is the same as for default value preselection. When filtering is configured for module link field it will be possible to choose only those values that match defined filtering rules.

Next table explains how to configure filtering for the module link field definition for different cases:


#


Case

Filtering rule

Fields in linked module

Filter by

1

The module link to User management module is filtered by current user’s property, e.g. Title, Division etc.

{UserPropertyField}

CURRENT USER

2

The module link to User management module is filtered by User Groups.


Note, this rule is ignored for Site/System administrators!

{LinkedUser}

CURRENT USER GROUPS

3

The module link is filtered on the fly according to the value specified in another field in same module (that should be understood as a “trigger”)

{Field}


(Field you want to compare with a “trigger”)

{Field}


(A field in the current module that you want to use as a “trigger”)

4

The module link is filtered on the fly according to the value related to another module link field (so comparison can be done with values of fields in the module “trigger” module link points to)

{Field}


(Field you want to compare with related value of the “trigger”)

{ModuleLink.Field}


(A field in the module “trigger” module link points to)

5

The module link is filtered according to the predefined static values of another field of optioned type


Note! Filtering by static values is limited to optioned fields only.

{Field}


(Field with options you want to compare with its static values)

STATIC VALUE

{value1}

{value2}

...


(several static values can be selected at once, comparison will be provided according to OR logic)

6

The module link is filtered according to the combination of rules chained by AND/OR logic.

  • AND means that value will be available for selection if and only if the value matches all the rules specified.

  • OR means that value will be available for selection if the value matches at least one of the rules specified.

AND/OR

rule 1

rule 2

rule 3

...

Example for case 1

Each user has an associated client he responsible to. We want that current user will see only the users associated with the same client in the User field.

image145.pngFiltering rule for the field User will be:

Fields in linked module

Filter by

Users.Client

CURRENT USER.(Client)

With this rule we literally tell the system: “Show only those users whose client is equal to the client of current user”.

Example for case 2

Each user is a member of one or more groups. With filtering by User Groups rule we literally tell the system: “Show only those users who are the members of the current user’s groups”. Rule is ignored for site/system administrators. 

Example for case 3

Each user has an associated organization he represents. We want “User” module link field to show only users who belong to the selected organization. Selecting an organization in “Organization” field will filter out the wrong users and leave only the organization’s representatives.

image146.png

Filtering rule for the field “User” will be:

Fields in linked module

Prefill by

Users.Organization

Briefs.Organization

With this rule we literally tell the system: “Leave those users whose organization is equal to the one selected in Organization field of the module Briefs”.

Example for case 4

Each user has several clients he responsible to. We want Client module link in module Briefs to be filtered automatically according to the user selected. Selecting a user in the “User” field will filter out wrong clients and leave only those related to the selected user.

image147.png

Filtering rule for the field Client will be:

Fields in linked module

Prefill by

Clients.Client Name

Users.Client

With this rule we literally tell the system: “Show those clients which are equal to the clients of the user selected in User field of the module Briefs”.

Example for case 5

Each user has a role assigned to him. We want to show only the users with a certain role (e.g. Client) in the User field of the module Briefs.

image148.png 

Filtering rule for the field User will be:

Fields in linked module

Filter by

User.Role

STATIC VALUE

Client

With this rule we literally tell the system: “Show only those users whose role is equal to the role specified in filtering rule”.

You can define several roles in configuration. In case the user also has several roles the filtering will be done according to OR logic. In other words, all users who has at least one role matched will be available for selection.