Create a user criteria record

Create a user criteria record to apply to items in Service Portal and control user access to pages, widgets, widget instances, and search sources.

About this task

You can apply existing user criteria to records in Service Portal through Service Portal configuration (Service Portal > Service Portal configuration). You can only create user criteria within the platform UI.

Procedure

  1. In the navigation filter, type Service Portal.
  2. Select a page, widget, or widget instance record.
  3. In the related list at the bottom of the record, select the Can View or Cannot View tab, then click New. If a user criteria record is already created, you can click Edit to apply user criteria to the page, widget, or widget instance.

    User criteria records are stored in the user_criteria table.

    User criteria for the Service Portal administrator

  4. Complete the fields on the form, as appropriate.
    Table 1. Service Portal User Criteria
    Field Description
    Name Name of the criteria record.
    Users User records to match access criteria.
    Groups Group records to match access criteria.
    Roles Roles to match access criteria.
    Advanced Displays or hides the Script field.
    Script Defines any additional criteria, and returns true or false. This field is available only if Advanced is selected.
    Note: Because scripts are evaluated dynamically, including scripts in user criteria records can decrease performance.
    Application Application scope for the user criteria record.
    Active Activate or deactivates this criteria record.
    Companies Companies to match access criteria.
    Locations Locations to match access criteria.
    Departments Departments to match access criteria.
    Match All Determines whether all elements from each populated criteria field must match. If selected, only users who match all criteria are given access. If cleared, the user must meet one or more of the set criteria to be given access.

    By default, this check box is cleared so that any condition met provides a match.

    For example, consider a user criteria record for the following:
    • Locations A or B
    • Company C or D

    With Match All selected, only users meeting all these conditions are matched. For example, a user with a location A and a company C.

    With Match All cleared, users meeting any of these conditions are matched. For example, a user with a location B.

    Note: If you select Match All, ensure that you do not create contradictory conditions that can never be met. For example, if all users in location A work for company G, then the conditions in this example can never be met.
  5. Click Submit.