PrashantLearnIT
Giga Sage

Hello Everyone,

 

gs.getProperty returns the property value as string irrespective of the type of property being accessed. But, if you are in global scope and want to return a property as 'Boolean', you can use GlideProperties.getBoolean() instead. Additionally, there is also a function GlideProperties.getInt() to return the property value as 'int'.

Sample Script : 

gs.print(typeof gs.getProperty('glide.invalid_query.returns_no_rows'));

gs.print(typeof GlideProperties.getBoolean('glide.invalid_query.returns_no_rows'));

 

If my content helped you in anyway, please mark this content as BOOKMARK, SUBSCRIBE & HELPFUL

 

Best Regards,

Prashant Kumar (LearnIT)

 

YouTube Channel LearnIT: https://www.youtube.com/@learnitwithprashant

Blog LearnIT: https://medium.com/@LearnITbyPrashant

Prashant Kumar LinkedIn: https://www.linkedin.com/in/learnitbyprashant/

ServiceNow Community Prashant Kumar - https://www.servicenow.com/community/user/viewprofilepage/user-id/19635