Using conditional expressions for classifications

Prevent users from selecting some classifications but you cannot delete the classifications

  • Description: As part of the implementation process, one of the tasks a customer completes is creation of the classification hierarchy. When classifications that made sense when you went through implementation no longer make sense, what can you do? You might delete the classifications that are not applicable. But if those classifications have been associated with item, you cannot delete them. You could also tell your users not to use the classifications or find every ticket that the classifications were applied to and delete them from the ticket. But both solutions have problems either from a usability perspective or from a data integrity perspective.

  • Issue: You cannot delete a classification when it has been used in applied to an item.

  • Solution overview: Use the configuration tools to enable an object restriction-based solution to hide the designated classifications from users, effectively preventing users from selecting them.


There are two parts to the solution because there are two fields in the application that are available for looking up classifications.

  • Hierarchical lookup is available from the Detail menu on the Classstructure.Hierarchypath field. Restrict the lookup at the highest level you wish to hide, and everything below in the hierarchy is hidden.
  • A Select Value item is available from the Classstructure.Description_Class You must restrict the individual classifications.

Restrict the lookup

In this example, classifications that are marked with the HIDE attribute (:hide=1) are not displayed to any agents of the Service Desk Rep (Tier 1) Service Group.

  1. In the Database Configuration application, add a YORN attribute called HIDE to the Classstructure record. This attribute will be used to specify the classifications to hide from the user.
  2. In the Application Designer, open the Classifications application.
  3. Add the HIDE attribute to the application.
  4. In the Conditional Expression Manager, create the expression :HIDE=0. For information about building conditional expressions, see the Conditional Expression Manager online help.
  5. Open the Security Groups application.
    • Create a security group called SDRep1 to add users to that group.
    • Add an object restriction to an existing group to restrict all users in that group.
  6. On the Data Restrictions tab, select the Object Restrictions tab.
  7. In the Object field, specify the Classstructure object.
  8. In the Condition field, click Detail menu and choose Select Value to select the expression :Hide=0.

Hide a classification

In this example, Hide is selected for the top-level classification "End User Issues".


The results differ depending on the type of lookup from the field.

  • From the Classification field, all classifications below the hidden classification are hidden.
  • From The Class Description field, only the hidden classification is hidden.

You can synchronize these fields in two ways:

  • Select Hide for all the classifications in the hierarchy.
  • Remove the lookup from the Class Description field.

Classification Field Hierarchical Lookup - Nothing below the hidden classification is available

Class Description Field - Only the hidden classification is not available. Any child classification with the terms "END USER" are still available.

Filter items by classification at a more granular level than at the application level

  • Description: Acme Service Desk distributes their incoming tickets based upon the initial classification selected by the self-service user. The default ownergroup for that classification is assigned to the ticket, when the classification is selected by the user. Ownergroup A is assigned to any ticket that has a classification that begins with a 1, 2, or 3. Ownergroup B is assigned to any ticket that has a classification that begins with a 4, 5, or 6. When agents of the service desk in ownergroup A log in, they see all tickets currently assigned to them and to any group they belong to. They select a service request and begin working on it. Part of their work is to validate that the proper classification was used and the appropriate level of classification was selected. When evaluating the classification, the agents are presented not only with the classifications they are assigned to (those beginning with 1, 2, or 3), but also the classifications that are the responsibility of ownergroup B. What do you do when you want the agents to see tickets only with the classifications their group is responsible for?

  • Issue: The classification Use with flags are at the application level. You require a more granular solution.

  • Solution overview: Filter the classification presentation based on security group ownership by setting a restriction.


Create a security group with a defined Object Restriction for the Classstructure object. Create a conditional expression to present certain nodes of the Classstructure object, based upon classificationid. Finally, we associate the user's record to the new Security Group.

This example restricts Sinclair from seeing classification nodes other than 1 and 2. Before the change, Sinclair has access to all incident-related classifications.

Create the restriction

  1. Open the Security Groups application.
  2. Create a security group called Class1and2.
  3. On the Data Restrictions tab, select the Object Restrictions tab.
  4. In the Object field, specify Classstructure.
  5. In the Condition field, click Detail Menu and specify an expression that shows Classifications that start only with 1 or 2.
    For example, :classificationid like '1%' or classificationid like '2%'
    Tip Make the restriction expression as specific as you need to support which groups need to see which classifications.
  6. Add the user Sinclair to the group.
  7. In the Conditional Expression Manager, create an expression that matches the Object Restriction you created.
    For information about building conditional expressions, see the Conditional Expression Manager online help.


Test the restriction

  1. Log in as Sinclair
  2. From the Incidents application, create an incident
  3. In the classification field, select Classify. Only Classification nodes 1 and 2 are available.

Popular posts from this blog

Jython Script Examples

Skip fields during duplication