Dynamic Filter Options not working

42sb
Tera Contributor

The only value which works for the script field within Dynamic Filter Options which functions is gs.getUserID().

I'm trying to use the option for a report source for filtering.

If I do:

gs.getUserID()

No problem:

Screenshot 2025-04-28 154013.png

If I do:

gs.getUser().manager
// OR
new MyManagerUtil().Get()

Nope:

Screenshot 2025-04-28 154338.png

 

Here is script include:

Screenshot 2025-04-28 154945.png

100% works fine in background script:

gs.info(new MyManagerUtil().Get()); 
// output: <sys_id>

 

Screenshot 2025-04-28 155145.png

Please inform of secret directions

2 REPLIES 2

J Siva
Tera Sage

Hi @42sb 
PFB the solved community post with similar requirement. You can follow the same by doing necessary modifications as required.
https://www.servicenow.com/community/itsm-forum/i-want-to-create-a-report-listing-incidents-created-...

 

Hope this helps.
Regards,
Siva

Ankur Bawiskar
Tera Patron
Tera Patron

@42sb 

please use client callable script include for this

check this link with all the steps

Create your own Dynamic Filters 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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