Catalog variables on RITMs behave differently than regular fields — they're stored as question/answer pairs in related tables, but ServiceNow provides the current.variables.variable_name abstraction to hide that complexity. The critical gotcha: reference variables require sys_id values, not display names, and boolean variables expect string values 'true'/'false', not JavaScript booleans. Most developers try setting reference variables to record names or using true/false — both silently fail.

When to use this

  • Auto-populating catalog variables based on the requester's profile or department
  • Setting configuration values when an RITM reaches a specific state (approved, fulfilled, etc.)
  • Correcting or standardizing variable values before processing in fulfillment workflows
  • Implementing business rules that require both RITM field values and catalog variable values

When NOT to use this

  • Don't use this in client scripts — catalog variables aren't available client-side, use catalog client scripts instead
  • Don't set variables on the request (sc_request) — variables belong to individual RITMs
  • Don't use this for complex data validation — use catalog item variable validation scripts instead
  • Don't use this in After Business Rules to set variables that drive workflow conditions — the workflow may have already evaluated

Key behaviors and gotchas

  • Reference variables require sys_id string values — setting a display name or GlideElement will fail silently
  • Boolean variables expect string 'true'/'false' values, not JavaScript boolean types
  • Variable names must match exactly what's defined on the catalog item — they're case-sensitive and don't follow field naming conventions
  • Use Before Business Rules when setting variables that affect workflow conditions — After rules may run too late
  • Choice variables accept the choice value string, but multi-choice variables need comma-separated values
  • Variable changes in Business Rules don't trigger additional Business Rules — avoid infinite loops but also don't expect cascading updates
⚠️

Setting variables on newly created RITMs requires an After Business Rule because variables don't exist during Before insert — the variable records are created after the RITM insert completes.

Free Newsletter

Enjoying this? Get one deep-dive per week.

Join 1,000+ ServiceNow pros — scripts, GlideRecord patterns, Flow Designer techniques, and career moves. Free.

No spam · Unsubscribe anytime