- My View
Are you looking for something like below -
var gr = new GlideRecord("change_request");
gr.get("sys_id of change request");
var gr2 = new GlideRecord("sys_user_has_role");
g2.addQuery("granted_by", "id granter");
PS: Hit like, Helpful, Correct and Endorse, if it answers your question.
Thanks for your Reply Nisha. I am very new to serviceNow and programming so may want a little more help. Let me rephrase the question.
I am trying to use the View/Run sub-menu in the Reports menu. In the table 'Change_request' , I want to extract only those 'assigned to' users who have a 'Granted_by' field populated as 'DBA' in the 'Sys_user_has_role' table.
Can you also guide me with the step by step process of inserting the java script in the menu 'View/Run'.
Many Thanks for your response.