
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 01-11-2022 01:22 PM - edited 2 weeks ago
ServiceNow property / properties
What's property?
- It's a constant value occurring continuously over a period of time (until updated by someone or something-code)
----
- gs.getProperty() does not work in client callable scripts
- There is an undocumented API called GlideProperties
-
- This can be used to retrieve System Properties in client callable scripts
- This can even be used to call some hidden system properties!
How do I see properties in ServiceNow?
Most of the system properties can be found in your left navigation under the 'System Properties' application as shown above.
ALL of the properties in the system are stored in the 'sys_properties' table and can be viewed and edited there by typing 'sys_properties. list' into the left navigation filter.
what's properties is it Available on the system?
On the previous list you'll see all properties instead of this list you can consult oficial documentation "Available Properties".
How do you create a property in ServiceNow?
Image | Description |
|
01. Navigate to sys_properties.list |
01. Click New | |
02. Type fields on minimum the name and value (to use on future)
what means each field you'll find HERE (Offical doc) |
|
03. Click Submit |
How do I get property value in ServiceNow?
For sample was created a property "u_my_propery" and we'll use it in fact the method/command gs.getProperty
Description | |
|
01. Property created |
02. Navigate to try it >> System definition > Scripts - Background |
|
|
03. Type the code gs.print(gs.getProperty("u_my_propery")); |
|
04. Run Script |
|
05. Your Result |
ServiceNow Best Practices:
Avoid using hard-coded values in scripts instead user properties.
One of the most important check on properties is the Ignore Cache which is always ignored by most of us, but its important to understand the importance of it.
Just putting the excerpt from the docs site here because it is very well explained.
Ignore cache |
The system stores system property values in server-side caches to avoid querying the database for configuration settings. When you change a system property value, the system always flushes the cache for the sys_properties table. Use this field to determine whether to flush this property's value from all other server-side caches. The default value of false causes the system to not ignore flushing caches, which results in flushing all server-side caches and retrieving the current property value from the database. Set this field to false when you want to ensure all caches have the current property value. The true value causes the system to ignore flushing some server-side caches, which results in only flushing the cache for the sys_properties table and preserving the prior property value in all other caches. Set this field to true to avoid the performance cost of flushing all caches and retrieving new property values. Typically, you should only set this field to true when you have a system property that changes more frequently than once a month, and the property value is only stored in sys_properties table. |
- 6,229 Views

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
That's a good article Tiago.
To add, One of the most important check on properties is the Ignore Cache which is always ignored by most of us, but its important to understand the importance of it.
Just putting the excerpt from the docs site here because it is very well explained.
Ignore cache |
The system stores system property values in server-side caches to avoid querying the database for configuration settings. When you change a system property value, the system always flushes the cache for the sys_properties table. Use this field to determine whether to flush this property's value from all other server-side caches. The default value of false causes the system to not ignore flushing caches, which results in flushing all server-side caches and retrieving the current property value from the database. Set this field to false when you want to ensure all caches have the current property value. The true value causes the system to ignore flushing some server-side caches, which results in only flushing the cache for the sys_properties table and preserving the prior property value in all other caches. Set this field to true to avoid the performance cost of flushing all caches and retrieving new property values. Typically, you should only set this field to true when you have a system property that changes more frequently than once a month, and the property value is only stored in sys_properties table. |
Regards
Vinayak

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I think it's crucial that you add this link, and it explains what each field is used for when setting up a new system property. You are missing that complete in your explanation, and there is no link to reference it.

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Two things I would add
- gs.getProperty() does not work in client callable scripts
- There is an undocumented API called GlideProperties
- This can be used to retrieve System Properties in client callable scripts
- This can even be used to call some hidden system properties!

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
added, tks

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
added, tks

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
added, tks
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Never heard of this API, great to learn something new.
Up until now I've always tackled this issue by using a very simple function in a Client Callable Script Include and returning the Property Value via GlideAjax
getPropertyClient: function() {
return gs.getProperty(this.getParameter('sysparm_property_name'));
}

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I didn't know about that one!
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
This ServiceNow Community article provides a comprehensive overview of system properties, emphasizing their role as constant values that persist until updated. It highlights the 'sys_properties' table where all properties are stored, accessible via the 'sys_properties.list' command. The guide details how to create new properties, retrieve their values using gs.getProperty(), and underscores best practices like avoiding hard-coded values in scripts. A notable tip is understanding the 'Ignore Cache' setting, which determines whether changes to a property should flush all server-side caches, impacting performance. ServiceNow