Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

Ankur Bawiskar
Tera Patron

Over the years, I’ve noticed many developers in the ServiceNow Community asking why gs.getProperty() doesn’t work when used inside a client‑callable Script Include, especially when that Script Include is triggered from a Report Filter Condition. 🤔

 

I faced the same issue a while back and was equally surprised by this limitation — so here’s a clear explanation and the workaround that saved the day! 💡

 

The Challenge

When a Script Include is client‑callable and is invoked through a report filter condition, the script actually executes on the client side.

This means:

👉 gs.getProperty() does NOT work in this context
👉 Because gs = server-side GlideSystem
👉 And a client-callable Script Include runs partially on the client, causing gs methods to fail

 

The Workaround That Works

Instead of using gs.getProperty(), you can:

🔍 Use GlideRecord to query the sys_properties table

Retrieve the property value like this:

var propValue = "";
var grProp = new GlideRecord("sys_properties");
grProp.addQuery("name", "<your_property_name_here>");
grProp.query();
if (grProp.next()) {
    propValue = grProp.value.toString();
}

// use this propValue now

This runs perfectly even when executed via a reporting filter condition. ✔️

📊 My Results

Before

Using gs.getProperty()No result returned

 

AnkurBawiskar_0-1767851767712.gif

 

After

Querying via GlideRecord → Property value returned successfully

 
AnkurBawiskar_1-1767851781196.gif

 

🎉 Final Thoughts

This is a simple but important detail that can save you hours of debugging.
If you're working with reports + client-callable script includes, avoid gs.getProperty() and go with a GlideRecord lookup instead. 💪

Comments
its_SumitNow
Mega Sage

Informative article @Ankur Bawiskar 

 

Warm Regards

Sumit Yadav

Technical Consultant

Philip Green
Mega Guru

@Ankur Bawiskar - this is brilliant - thank you!

chaithu1489
Kilo Sage

to give more context on why gs method fail in client callable script include is because of script sandbox.

https://www.servicenow.com/docs/r/api-reference/scripts/script-sandbox.html

Version history
Last update:
‎01-07-2026 10:06 PM
Updated by:
Contributors