Fieldcode Manual

Tip: You can use filters for better results

Filters can also be used, for example, in the dispogroup configuration to automatically assign incoming tickets to the appropriate dispogroups based on location. You can also use these filters to assign tickets with a certain ticket category to certain dispatch groups. Filter possibilities are almost endless, especially when you combine them with other filters in a group.

Filters can as well be used in the Admin panel to link the appearance or non-appearance of fields (in forms) to certain conditions. For example, certain form fields can be customised so that they only appear if a certain precondition is met. For example, the value ‘Yes’ must be in a previous field for the new custom field to appear at all for the user.

We are currently working on integrating filter grouping into more and more areas of the Admin panel. You can already benefit from filter grouping in the following areas:

Filters are used in the admin panel to link the appearance or non-appearance of fields (in forms) to certain conditions. For example, certain form fields can be customised so that they only appear if a certain precondition is met. For example, the value ‘Yes’ must be in a previous field for the new custom field to appear at all for the user.

A filter normally contains three main components, namely:

  • The Condition: What condition should be used for the filter?
  • The Operator: What relation should the condition have to the comparison value?
  • The Comparison Value: What value should be linked to the condition?

Let’s have a look at some examples for filter grouping:

Two or more filters can be combined/grouped by the use of the following operators:

  • AND operator:
    true && true // results in true
    true && false // results in false
    false && false // results in false 
  • OR operator: 
    true || true // results in true
    true || false // results in true
    false || false // results in false
Example for the AND operator:

Let's say you want to filter tickets by category and country:

Tickets = [
{Category: "Standard", Country: "Germany"},
{Category: "Break&Fix", Country: "USA"},
{Category: "Maintenance", Country: "Austria"},
{Category: "IMACD", Country: "Germany"},
{Category: "Standard", Country: "USA"}
]

Filtering by Category and Country:
If you want to filter tickets that are in the "Standard" category and are from "Germany", you can use the AND operator for your grouped filter:
Category is equal to Standard AND Country is equal to Germany

  • With the AND filter we ensure that both conditions are met.
  • The result would be a list with tickets from Germany, that fall under the "Standard" category.
Example for the OR operator:

Let's say you want to filter by category or country:

Tickets = [
{Category: "Standard", Country: "Germany"},
{Category: "Break&Fix", Country: "USA"},
{Category: "Maintenance", Country: "Austria"},
{Category: "IMACD", Country: "Germany"},
{Category: "Standard", Country: "USA"}
]

Filtering by Category or Country:
If you want to filter tickets that are either in the "Standard" category or are from "Germany", you can use the OR operator for your grouped filter:
Category is equal to Standard OR Country is equal to Germany

  • With the OR filter we ensure that at least one of the conditions is met.
  • The result would be a list with tickets that are either in the "Standard" category or from germany.

Relational operators can be used to link a condition and a comparison value.
In the table below, we assume “a” is equal to the “Condition”.
In the table below, we assume “b” is equal to the “Comparison Value”.

Please note that relational operators are also used inside validation conditions.
Therefore the list below may help you as well for creating your own validations.

Let’s take a closer look at how relational operators can link a condition and a comparison value.

Operator SyntaxRelational operatorFilter ExampleFilter Result
a==bIs Equal ToTicketId Is Equal To 1Filters for tickets with the Ticket ID equal to 1.
a!=bIs Not Equal ToTicketId Is Not Equal to 1Filters for tickets with the Ticket ID not equal to 1. The Ticket ID 1 would be not included in the filter.
a~~bIs LikeCountry is Like GermanyCase sensitive filter, filters for "Germany", and those that contain the expression "Germany" in some close way, e.g. "germany" would be covered.
a!~~bIs Not LikeCountry is Not Like GermanyCase sensitive filter, filters for all other countries, except those that contain the expression "Germany" in some close way, e.g. "germany" would be as well not covered.
a in bInTicketId in [123, 24, 31]
a=~bContainsTicket CNE Contains "TEST"
a!=~bNot ContainsTicket CNE Not Contains ”TEST\-\d{4}"
a Is NullIs NullPrimary phone number Is NullFilters for a empty primary phone number field, operator is particular useful for validations.
a Is Not NullIs Not NullPrimary phone number Is Not NullFilters for a filled in primary phone number field, operator is particular useful vor validations.
Was this topic helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we further improve this topic?
Please provide the reason for your vote. This will help us improve this topic.
Navigation