Call a property in script include

Evren Yamin
Tera Contributor

Hello,

Is there a way to call the value of a property in a script include? I tried using gliderecord on the sys_properties table ang getting the value but it's not working.

Here is the script that I have used 

find_real_file.png

17 REPLIES 17

Maik Skoddow
Tera Patron
Tera Patron

Hi

there is no need to query a system property. Instead use

var property = gs.getProperty('property_name');

Kind regards
Maik

I have tried that one first but it's not working properly when called in script include.

Then saw this in the community 

find_real_file.png

Hi,

alternative you can use also

var property = gs.getProperty('property_name','default_value');

to eliminate potential possibility and script "exception" when

- property does not exists

- property has no value

Regards

Radim

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

As mentioned by Maik directly use that syntax

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader