Understanding the Difference Between current and current.variables in ServiceNow
- nathanlee142
- Mar 19
- 2 min read
Updated: Mar 30

In ServiceNow scripting, especially within workflows, developers often encounter confusion about when to use current.variablename versus current.variables.variablename. Clarifying this distinction is essential for creating efficient, error-free workflows and scripts. This article explains the differences, proper usage, and provides clear guidance to ensure accuracy and consistency in ServiceNow scripting practices.
The Difference Explained
In ServiceNow workflows, current refers directly to the record from the table upon which the workflow is running. This might be an incident, request item (RITM), or another table record. Thus, current.variablename directly accesses the columns (fields) available on that specific record.
Conversely, current.variables.variablename accesses variables associated with a catalog item that the user submits. These variables are stored separately from the main record, typically within a variable record or variable table (sc_item_option_mtom or sc_item_option) linked to a specific requested item or task.
Common Causes of Confusion
Confusion typically arises when the same or similar names exist for both a table field and a catalog variable. In some situations, using either current.variablename or current.variables.variablename might appear to produce similar results. However, these approaches are fundamentally different, and inconsistent usage can lead to scripting errors and unexpected results.
Best Practice and Proper Usage
The following guideline helps to clearly distinguish when to use each:
Use current.variables.variablename when referencing user-input variables from catalog items or service catalog forms. These variables are not actual fields on the main record table but are associated specifically with the requested item (RITM).
Use current.variablename when directly referencing fields (columns) that exist on the table itself. For example, fields on the Requested Item (sc_req_item) or Incident (incident) tables.
Practical Example
Suppose you have a catalog item where users input their "Preferred Delivery Date" as a catalog variable (preferred_delivery_date). When scripting within the workflow associated with the requested item, you would use:
var deliveryDate = current.variables.preferred_delivery_date;
However, if you want to access a direct field like "State" on the requested item itself, your script should directly reference the column:
var currentState = current.state;
Alternative Considerations
If encountering confusion, it's advisable to clearly differentiate variable names from column names during the initial setup of catalog items and tables. Clearly distinguishing these elements at design-time reduces the likelihood of ambiguity and scripting errors in workflows.
Conclusion
Understanding and properly utilizing current and current.variables is crucial for ServiceNow developers. Misuse of these elements can lead to unpredictable behavior and scripting errors. Always remember:
Catalog variables (current.variables.variablename) are distinct from table fields (current.variablename).
Maintain clear naming conventions to minimize confusion.
By following these best practices, developers can create robust, maintainable, and efficient workflows within the ServiceNow platform. Continue exploring ServiceNow documentation and community resources for further insights to refine your scripting practices.