--- title: Add a dynamic JavaScript filter description: Add a dynamic JavaScript statement for evaluation as part of a report visualization's filter criteria. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/now-intelligence/create-dynamic-js-filter-pae.html release: australia topic_type: task last_updated: "2026-05-01" reading_time_minutes: 5 breadcrumb: [Filter data visualizations with the condition builder, Configure, Data visualizations, Platform Analytics experience, Platform Analytics] --- # Add a dynamic JavaScript filter Add a dynamic JavaScript statement for evaluation as part of a report visualization's filter criteria. ## Before you begin Role required: itil, report\_user, report\_group, report\_global, report\_admin, or admin. To create a meaningful report, you must have the right to access the data you want to report on. ## About this task JavaScript filters can be single-line statements, or longer scripts. For longer JavaScript statements, create a script include that returns the correct format and data type, conforms to the specific data that the report should filter for, and is client callable. For more information, see [Script includes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/api-reference/scripts/c_ScriptIncludes.md). This table lists the operators supported by each field type that supports JavaScript filters. Field types that are not in this table do not support JavaScript filters and the **Value** field in the condition builder for those field types does not have the option to paste your own statements.
| Field type | Allowed operators | Expected return data type |
|---|---|---|
| Sys ID \(GUID\) | "is", "is not", "is one of", "starts with", "ends with", "contains", "does not contain", "between", "greater than or is", "less than or is". | Textual representation of a complete or partial sys\_id value.For the "is one of" operator, the expected return type would be either a comma-delimited list of sys\_id values or an array containing each sys\_id that should be included in the results. |
| Free Text String | "is", "is not", "is one of", "starts with", "ends with", "contains", "does not contain", "between", "greater than or is", "less than or is" | One or more textual characters. For the "is one of" operator, the expected result would be either a comma-delimited list of string values or an array containing each of the values to include in the "is one of" search value field. |
| Reference | "starts with", "ends with", "contains", "does not contain" | One or more textual characters that may represent some value or portion of a value found in this field in the table or data source. |
| String \(referencing another table\) | "contains", "starts with", "ends with", "does not contain" | One or more textual characters that may represent some value or portion of a value found in this field in the table or data source. |
| User Input | "is", "is not" | Textual characters that could represent the full value of some record for this field in the table or data source. |
| Table Name | "is", "is not", "is one of", "starts with", "ends with", "contains", "does not contain", "between", "greater than or is", "less than or is" | Textual representation of a complete or partial Table Name in the system. For the "is one of" operator, the expected return type would be either a comma-delimited list of Table Name values or an array containing each Table Name that should be included in the results. |
| Template Value | "is", "is not" | Textual characters that will fulfill the value as per a Template found on the instance. |
| Domain ID | "starts with", "ends with", "contains", "does not contain" | One or more textual characters that may represent some value or portion of a value found in the domain field in the table or data source. |
| User Roles | "is", "is not" | Textual representation of a user role string value. |
| Domain Path | "starts with", "ends with", "contains", "does not contain", "is", "is not", "is one of", "less than or is", "greater than or is", "between" | One or more textual characters that may represent some value or portion of a value found in this field in the table or data source. For the "is one of" operator, either a comma-delimited list of textual values or an array object containing each value that should be included. |
| Translated Text | "is", "is not", "is one of", "starts with", "ends with", "contains", "does not contain", "between", "greater than or is", "less than or is" | Textual value.For the "is one of" operator, the expected return type would be either a comma-delimited list of textual values or an array of textual values. |
| Translated Field | ||
| HTML | "contains", "does not contain" | Textual value which might correspond to data in the selected field in this report criteria. |
| HTML Template | ||
| Email Script | "contains", "does not contain" | Textual value representing a value that should \(or should not\) be in the Email Script field. |
| Script \(Plain\) | "contains", "does not contain" | Textual value representing a value that should \(or should not\) be in the Script field. |
| Script \(server side\) | ||
| Script | ||
| Short Table Name | "is", "is not" | Textual value \(under 40 characters\).For the "is one of" operator, the expected return type is either a comma-delimited list of textual values or an array containing each textual character that would represent a short table name. |
| Field Name | "is", "is not", "is one of", "starts with", "ends with", "contains", "does not contain", "between", "greater than or is", "less than or is" | Textual representation of a complete or partial field name value.For the "is one of" operator, the expected return type would be either a comma-delimited list of field name values or an array containing each field name that should be included in the results. |