{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":42482,"path":"platform-user-interface/service-portal/create-user-criteria-record.md","title":"Create a user criteria record for Service Portal","bundle":null,"doc_type":null,"release":"australia","body":"\n# Create a user criteria record for Service Portal\n\nCreate a user criteria record to apply to items in Service Portal and control user access to pages, widgets, widget instances, and search sources.\n\n## Before you begin\n\nRole required: admin\n\n## About this task\n\nYou can [apply existing user criteria](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-user-interface/service-portal/widget-user-criteria.md) to records in Service Portal through Service Portal configuration \\(**Service Portal** &gt; **Service Portal configuration**\\). You can only create user criteria within the platform UI.\n\n## Procedure\n\n1.  In the navigation filter, type **Service Portal**.\n\n2.  Select a page, widget, or widget instance record.\n\n3.  In the related list at the bottom of the record, select the **Can View** or **Cannot View** tab, then click **New**.\n\n    If a user criteria record is already created, you can click **Edit** to apply user criteria to the page, widget, or widget instance.\n\n    User criteria records are stored in the \\[user\\_criteria\\] table.\n\n4.  Complete the fields on the form, as appropriate.\n\n<table id=\"table_ojq_r1g_1r\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nName\n\n</td><td>\n\nName of the criteria record.\n\n</td></tr><tr><td>\n\nUsers\n\n</td><td>\n\nUser records to match access criteria.\n\n</td></tr><tr><td>\n\nGroups\n\n</td><td>\n\nGroup records to match access criteria.\n\n</td></tr><tr><td>\n\nRoles\n\n</td><td>\n\nRoles to match access criteria.\n\n</td></tr><tr><td>\n\nAdvanced\n\n</td><td>\n\nDisplays or hides the **Script** field.\n\n</td></tr><tr><td>\n\nScript\n\n</td><td>\n\nDefines any additional criteria, and returns true or false. This field is available only if **Advanced** is selected. **Note:**\n\n-   Because scripts are evaluated dynamically, including scripts in user criteria records can decrease performance.\n-   Do not use a function with its name as answer, that is, answer\\(\\).\n\n\n</td></tr><tr><td>\n\nApplication\n\n</td><td>\n\nApplication scope for the user criteria record.\n\n</td></tr><tr><td>\n\nActive\n\n</td><td>\n\nActivate or deactivates this criteria record.\n\n</td></tr><tr><td>\n\nCompanies\n\n</td><td>\n\nCompanies to match access criteria.\n\n</td></tr><tr><td>\n\nLocations\n\n</td><td>\n\nLocations to match access criteria.\n\n</td></tr><tr><td>\n\nDepartments\n\n</td><td>\n\nDepartments to match access criteria.\n\n</td></tr><tr><td>\n\nMatch All\n\n</td><td>\n\nDetermines 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.\n\n For example, consider a user criteria record for the following:\n\n-   Locations A or B\n-   Company C or D\n With **Match All** selected, only users meeting all these conditions are matched. For example, a user with a location A and a company C.\n\n With **Match All** cleared, users meeting any of these conditions are matched. For example, a user with a location B.\n\n **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.\n\n</td></tr></tbody>\n</table>5.  Click **Submit**.\n\n\n**Parent Topic:**[User criteria for Service Portal](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-user-interface/service-portal/user-criteria.md)\n\n"}}