what does user field mean in report??

Kiddy
Tera Guru

what does user field refer in report ,i am not able to edit it if the user becomes inactive will the report stop showing?? how can we edit it

 

find_real_file.png

3 REPLIES 3

Community Alums
Not applicable

That's the user who created the report or effectively who it is shared with. As admin you should be able to edit the report and share it appropriately.

hi thanks i tried as an admin to change but its read only 

Harsh Vardhan
Giga Patron

There are two tables, in which all report data related to sharing stores.

1. Report [sys_report]

2. Report users and Groups [sys_report_users_groups]

 

And there are three types of sharing:

 

1. Me

2. Everyone - here we can define Roles also.

3. Groups and Users

 

Now, there is an field USER in the REPORT table.

1. If the type of sharing is ME then this field contains the SYS_ID of that particular user.

2. If the type of sharing is Everyone then the value of this field is GLOBAL. And if user defines the specific ROLE, then this value will store in the ROLES field of the same(REPORT[sys_report]) table.

3. If the type of sharing is Group and Users, then the values of groups and roles are stores in the Report users and Groups [sys_report_users_groups] table.

        a. GROUP ID field of this table refer to the Groups [sys_user_group] table.

        b. REPORT ID field of this table refer to the Reports [sys_report] table.

        c. USER ID field of this table refer to the   Users [sys_user] table. 

 

so you have to make the changes from report, you will sharing option and make the changes based on your need it. 

 

There is also other way to update the user field , which is script. 

 

var newUser = 'user sys id';
var gr = new GlideRecord('sys_report');
gr.addQuery('sysid', 'sys id of your report');
gr.query();
if (gr.next()) {
    gr.user = newUser;
    gr.setWorkflow(false);
    gr.update();
}

 

If i answered your query kindly mark it as correct and helpful.