Thank you for your feedback.
Form temporarily unavailable. Please try again or contact docfeedback@servicenow.com to submit your comments.
Versions
  • London
  • Kingston
  • Jakarta
  • Istanbul
  • Helsinki
  • Geneva
  • Store
Close

Search as different user

Search as different user

When you define contextual search for tables, you can choose to display search results as they would appear to a different user who performs the search.

About this task

For example, an HR administrator may want to display contextual search results, for a user who made an HR request, to find out why these results did not answer the user's query.

Note: The results for the user performing the search are based on that specific user's security access. Hence, the search result view for that user may have fewer entries than what that user can actually view.

Procedure

  1. Navigate to Contextual Search > Table Configuration.
  2. Open a table configuration record.
  3. In the Search as section of the form, fill in the fields as appropriate.
    Search as configuration fields
    Table 1. Search as configuration fields
    Field Description
    Enable search as Check box use search as functionality.
    Search as field The field on the table to identify the user to search as. You can only select User Reference fields.

    For example, select Opened by to search as the user who opened the relevant record.

    Condition Specify the conditions based on which the search as results are displayed.
    Script A condition script, enabling administrators to implement more powerful conditions. For example, to restrict access to users that are members of a group, use gs.getUser().isMemberOf("<group name").
    Note: Both Condition and Script must evaluate to true for the results to be displayed.
    Note: An empty script evaluates to true.

Result

When an eligible user opens the form for this table and enters search terms, two tabs are displayed: one with the search results the user sees (My results), and one with the search results the other defined user sees (<User name>'s results).

This site is scheduled for a small content update on Tuesday, December 18th, between the hours of 4:00pm and 8:00pm Pacific Time (Dec 19 00:00 – Dec 19 4:00 UTC). Access to this site may be slightly delayed during that time.