Simple List Widget Filter

Andrew114
Kilo Explorer

I am relatively new to ServiceNow so please forgive my ignorance. 

I have a requirement to make a list available on the service portal that shows all Major Incidents where the incident's parent location matches the current logged in user's parent location. I have tried to create this using the simple list widget but I am realizing that I cannot dotwalk to get information from the user's location record in the simple list widget's filter.  

Can someone please advise on the best way to accomplish this?

1 ACCEPTED SOLUTION

Vinay Mishra3
Mega Guru

Hi Andrew,

Write a script include function (Write your logic here) then return all the matching sys_is's, then open the list widget instance and in filter put sys_is is one of javascript:yourScriptIncludeName().functionname()

 

See the below snap for reference.

 

Please mark correct/helpful, If its applicable for you.

 

Thanks,

Vinay

find_real_file.png

View solution in original post

8 REPLIES 8

raphaelcrv
Kilo Guru

Hi Andrew, How are you?

So i think your problem is just filter, i recomend filter on the plataform:

Bellow follow the step by step:

1 - type yout table on search like this (sys_user.list)

find_real_file.png

2 - apply a filter as you need we have the dynamic as showing on the image bellow

find_real_file.png
3 - the trick is copy the query and apply on the widget

find_real_file.png

 

Apply the query on the simple list and everything will work!!

 

find_real_file.png



Good Luck,
I hope this solve your problem 🙂

If my response was helpful and/or provided a solution, please consider marking it as such. Thank you!

Vinay Mishra3
Mega Guru

Hi Andrew,

Write a script include function (Write your logic here) then return all the matching sys_is's, then open the list widget instance and in filter put sys_is is one of javascript:yourScriptIncludeName().functionname()

 

See the below snap for reference.

 

Please mark correct/helpful, If its applicable for you.

 

Thanks,

Vinay

find_real_file.png

Andrew114
Kilo Explorer

This was just what I needed, thanks Vinay!

Please mark my answer Correct/Helpful, If it worked for you.

 

Thanks,

Vinay