Can activity be hidden in workspace?

Joaquin Campos
Mega Sage

Dear community,

 

I'm struggling trying to hide activity section from workspace. Due to privacy reasons only specific group members are allowed to see it but I haven't managed to make it work with views, acls, client scripts...

Can anyone confirm if this is feasible or not?

 

JoaquinCampos_0-1694599395866.png

 

Thanks a lot in advance:

 

Joaquín

 

1 ACCEPTED SOLUTION

Joaquin Campos
Mega Sage

Hi all,

 

Finally I managed to solve this through UX View Form View Rules and Dynamic filters. The outcome is that I was able to hide the details tab in workspace which includes the journal. This will hide additional fields such as description, requested for... but it was ok in my case as we needed to hide all of them due to privacy reasons. Here the details:

 

  1.  I created a new UX Form View Rule. Normal view rules have a script section where you can add more complex conditions to set or not a view. In the case of UX Form View rules, we're missing the possibility to enter script code, so I created a dynamic filter to set more complex conditions (in this case related to the assignment groups)

JoaquinCampos_0-1695122124156.png

 

2. In the form settings tab, I used the flag "Hide details and UI actions":

 

JoaquinCampos_2-1695122759572.png

 

 

3. For the dynamic filter creation I created a script include and I pointed to it in the script and reference script fields:

JoaquinCampos_1-1695122563167.png

 

4. This is the code that I added in my script include function:

CheckDynamicGropus: function(current) {

        var validMember = (current.isNewRecord() ||
            gs.getUser().isMemberOf(current.assignment_group) ||
            current.request.requested_for == gs.getUserID() ||
            gs.getUser().isMemberOf('<assignment group1>') ||
            gs.getUser().isMemberOf('<assignment group2>') ||
            gs.getUser().isMemberOf('<assignment group3>') ||
            gs.getUser().isMemberOf('<assignment group4>') ||
            gs.getUser().isMemberOf('<assignment group5>') ||
            gs.getUser().isMemberOf('<assignment group6>'));
       
        return validMember;
    },

5. As result, if conditions are met, details tab is hidden and journal list as well:

JoaquinCampos_3-1695123241482.png

 

Hope this helps!

 

Joaquín

 

View solution in original post

3 REPLIES 3

Joaquin Campos
Mega Sage

Hi all,

 

Finally I managed to solve this through UX View Form View Rules and Dynamic filters. The outcome is that I was able to hide the details tab in workspace which includes the journal. This will hide additional fields such as description, requested for... but it was ok in my case as we needed to hide all of them due to privacy reasons. Here the details:

 

  1.  I created a new UX Form View Rule. Normal view rules have a script section where you can add more complex conditions to set or not a view. In the case of UX Form View rules, we're missing the possibility to enter script code, so I created a dynamic filter to set more complex conditions (in this case related to the assignment groups)

JoaquinCampos_0-1695122124156.png

 

2. In the form settings tab, I used the flag "Hide details and UI actions":

 

JoaquinCampos_2-1695122759572.png

 

 

3. For the dynamic filter creation I created a script include and I pointed to it in the script and reference script fields:

JoaquinCampos_1-1695122563167.png

 

4. This is the code that I added in my script include function:

CheckDynamicGropus: function(current) {

        var validMember = (current.isNewRecord() ||
            gs.getUser().isMemberOf(current.assignment_group) ||
            current.request.requested_for == gs.getUserID() ||
            gs.getUser().isMemberOf('<assignment group1>') ||
            gs.getUser().isMemberOf('<assignment group2>') ||
            gs.getUser().isMemberOf('<assignment group3>') ||
            gs.getUser().isMemberOf('<assignment group4>') ||
            gs.getUser().isMemberOf('<assignment group5>') ||
            gs.getUser().isMemberOf('<assignment group6>'));
       
        return validMember;
    },

5. As result, if conditions are met, details tab is hidden and journal list as well:

JoaquinCampos_3-1695123241482.png

 

Hope this helps!

 

Joaquín

 

ServiceNowVS
Tera Expert

Hi  Joaquin,

I am trying to put condition and hide activity log.. But it is not working for me. Activity is still displayed.

Any idea why?

Hi,

I found out that it's only working on Agent Workspace, not on Service Operations Workspace.

Maybe that's your case?

 

Regards:

 

Joaquín