Using "javascript:" in filter

Explore Analytics supports using ServiceNow JavaScript functions in filter conditions. Those are functions that are defined in ServiceNow and are marked as “client callable”, making them available to use in filter conditions.

To use them in Explore Analytics, consider the following tips:

  • If the JavaScript function returns sys_id’s, make sure to select a sys_id field. In our example above, we selected Caller Sys ID rather than Caller. (When you select “Caller” in Explore Analytics, you’re really selecting “Caller Name”)
  • To have the JavaScript function evaluate under the user’s identity, remember to check the option “run queries as the ServiceNow user” when editing the Data Source.
  • If you are writing your own JavaScript function, make sure to mark it as “client callable” and test it in ServiceNow by using it in the filter of a list


Please sign in to leave a comment.