We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

What is CONSTANT and use of Constant?

Sid_Takali
Kilo Patron

I'm new in servicenow and trying to educate myself. I wants to know What is CONSTANT and what is the use of Constant?

Thanks!

1 REPLY 1

Sandeep Rajput
Tera Patron

Constant: A constant in ServiceNow is a variable whose value never changes after the initialisation. 

 

There are two ways to define constant within ServiceNow.

1. Using properties: Define a property key value pair within System property and use its value within your code.

2. Create a Script Include: Create a separate include containing your constant variables (misnomer) and use it across your business rules and script includes.

 

Hope this helps.