How to filter 'Assigned To' to the current user

rev
Kilo Contributor

Hi All,

I'm currently running into some difficulties and would appreciate some insight. I created a new module that returns

a list of records(ticket forms) that are assigned to the current user logged into the instance. The module will list the

records if the following conditions are true:

        1. If the checkbox "Ready for QA" is checked on the ticket

        2. If the value of 'Assigned To' on the form is equal to that of the person currently logged into the instance.

I was able to create the module and get it to return forms that have "Ready for QA" checked. However I am unable

to figure out the script to put into the Assigned To filter so that the module only displays tickets that have "Ready for

QA" check AND are assigned to the current user of the instance.

I believe I would need to input something like javascript:"sys_id==gs.getUserID()", or something along those lines. However

I can't seem to get the Assigned To condition working. I'm returning to Service Now development after   a long break so please

forgive me if the script is simple.

Here's an image so that it may be easier to understand where I'm stuck

QAPic1.PNG

1 ACCEPTED SOLUTION

Mike Allen
Mega Sage

Assigned To is javascript:gs.getUserID()





Also, javascript:getMyAssignments()



find_real_file.png


View solution in original post

4 REPLIES 4

Gene1
Tera Contributor

javascript:gs.getUserID() should work for you.


Mike Allen
Mega Sage

Assigned To is javascript:gs.getUserID()





Also, javascript:getMyAssignments()



find_real_file.png


rev
Kilo Contributor

Ah, so I was close after all. Thanks for the detailed response!


manikorada
ServiceNow Employee
ServiceNow Employee

You need to use : javascript:gs.getUserID()