Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

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
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.