Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Fetch current logged in user incident in simple list widget

Sagar_pawar
Tera Contributor

Hello All,

I want to fetch logged-in user incidents in a simple list widget.I tried it manually so it's working fine for me but I like it dynamically I have attached a screenshot below. how can I achieve this functionality please guide me on this

Thank You.

1 ACCEPTED SOLUTION

-O-
Kilo Patron

For that one can use so called "Dynamic Filter Option" (these can be defined/created too, but quite a few exist OOB).

It looks like this:

2023-01-28-1.jpg

This will make the system "resolve" the operand (Me) before applying the filter, so it becomes Caller is Developer.

If we copy the query:

2023-01-28-2.jpg

 it will look like this:

 

caller_idDYNAMIC90d1921e5f510100a9ad2572f2b477fe

 

90d1921e5f510100a9ad2572f2b477fe is the unique id of the Dynamic Filter Option:

2023-01-28-3.jpg

This is an OOB Dynamic Filter Option, so it will be there in all instances and can be used; thus you can set your filter like this:

 

active=true^caller_idDYNAMIC90d1921e5f510100a9ad2572f2b477fe

 

Which can be obtained by copying the filter defined below:

2023-01-28-4.png

 

View solution in original post

4 REPLIES 4

-O-
Kilo Patron

For that one can use so called "Dynamic Filter Option" (these can be defined/created too, but quite a few exist OOB).

It looks like this:

2023-01-28-1.jpg

This will make the system "resolve" the operand (Me) before applying the filter, so it becomes Caller is Developer.

If we copy the query:

2023-01-28-2.jpg

 it will look like this:

 

caller_idDYNAMIC90d1921e5f510100a9ad2572f2b477fe

 

90d1921e5f510100a9ad2572f2b477fe is the unique id of the Dynamic Filter Option:

2023-01-28-3.jpg

This is an OOB Dynamic Filter Option, so it will be there in all instances and can be used; thus you can set your filter like this:

 

active=true^caller_idDYNAMIC90d1921e5f510100a9ad2572f2b477fe

 

Which can be obtained by copying the filter defined below:

2023-01-28-4.png

 

Sagar_pawar
Tera Contributor

Hello @-O- Its not dynamic when we impersonate to other user its not working .its showing empty after impersonation. as per logged in user I want all tickets 

.

Thank You

Sagar_pawar
Tera Contributor

Hello @-O- I tried same filter condition but when I impersonate to other user its not working its showing me empty list.why this happening please guide me on this.

Thank you