How can i fetch the SysID of the users in a report
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2022 01:23 AM
How can i fetch the SysID along with user name of the SNOW users in a report ?
- Labels:
-
Reporting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2022 01:28 AM
Hi
It is possible for the report name and sysids
1.Create a custom fields on the form with the names sysid and Test fields as a string filed types in user table form
2. Create a Business rule on user table (sys_user) like this for the both Insert and update select the both check boxes
(function executeRule(current, previous /*null when async*/) {
var sysid=current.sys_id;
current.u_sysid=sysid;//Replace sysid as per ur wish
gs.addInfoMessage(sysid);
})(current, previous);
3. Run the backgroundscript like this for updating the all the records in the database
var gr=new GlideRecord('sys_user');
gr.addActiveQuery();
gr.query();
while(gr.next()){
gr.u_text='hello am updating this records for populating all recordsysids in sysid field ';
gs.log(gr.getRowCount());
gr.update();
}
Finally you will get the report like this i hope this will helpful to u
Refer to this thread : https://community.servicenow.com/community?id=community_question&sys_id=c7954beddbd8dbc01dcaf3231f96...
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2022 08:05 AM
Hi
Any update to this ?Any follow-up required? if not
Kindly mark the answer as Correct & Helpful both such that others can get help.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2022 01:28 AM
Hello,
Have you checked below thread?
Thanks
Akshay Kangankar
Please Mark ✅ Correct/helpful, if applicable,