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

Debug a Service Catalog variable

Debug a Service Catalog variable

Monitor changes in the state and the value of a Service Catalog variable due to catalog client scripts, catalog UI policies, and catalog data lookups. You can diagnose and resolve issues related to such changes, and track client-side scripting errors on this tab.

Before you begin

Role required: admin or catalog_admin

Procedure

  1. Enable the JavaScript log and field watcher..
    1. In the banner, click the settings icon ().
    2. In the System Settings window, click the Developer tab.
    3. Enable the JavaScript Log and Field Watcher option.
      The JavaScript Log and Field Watcher tabs are displayed in a pane at the bottom of the page. For information about JavaScript logs and fields watcher, see JavaScript log and Field Watcher .
    4. Close the System Settings window.
  2. Navigate to Service Catalog > Catalog Definitions > Maintain Items.
  3. In the Catalog Items list, select a catalog item to debug its variables, and click Try it.
  4. On the form, right-click a variable field label and select Watch Variable.
    The debug icon () is displayed next to the variable, and the Field Watcher tab in the bottom pane is replaced with the Variable Watcher tab.
  5. Edit the fields on the Variable Watcher tab.
    Field Description
    Item Current catalog item.
    Variable Variable that is being watched.
    Type Type of the variable.
    Create roles User type that can create values for the variable.
    Write roles User type that can edit values for the variable.
    Read roles User type that can read values for the variable.
    Reference Reference table for the variable. Applicable for reference variables.
    Reference Qual Qualifiers to restrict data that is available in the field. Applicable for list collector, lookup multiple choice, lookup select box, and reference variables.
    Attributes Attributes of the variable.
    Delete roles User type that can delete values for the variable.
    All If selected, displays the action log of the variable due to catalog client scripts, data lookups, and catalog UI policies.
    Catalog Client Script If selected, displays the action log of the variable due to catalog client scripts.
    Data lookup If selected, displays the action log of the variable due to data lookups.
    Catalog UI Policy If selected, displays the action log of the variable due to catalog UI policies.
    Figure 1. Variable Watcher tab
    Screenshot for the Variable Watcher tab
  6. To watch another variable, right-click that variable and select Watch Variable.
    Note: You can watch only one variable at a time.
  7. To stop watching a variable, right-click the variable and select Unwatch Variable.
  8. To clear the logs, click the Clear log icon ().
  9. To resize the pane, click Small, Medium, or Large.
  10. To close the pane, click the Close icon ().