Hovering over preview icon does not respect hidden variable UI policy

maria03
Tera Contributor

I have a ui policy (tried also a client script) to hide certain variables if user doesn't have a role. This works properly, the issue is when a user is at a TASK level, and user clicks the 'i' icon next to the requested item to preview the record, those fields are visible.  

I found a KB article from servicenow that says the best way to achieve this is via ACL but it doesn't explain how. Can someone help with an example?

 

Thanks,

4 REPLIES 4

Brad Bowman
Kilo Patron
Kilo Patron

An easier approach is to remove the variable editor from this view as it is meant to be a record preview, not a snapshot.  To do so, navigate to 

<your instance name>.service-now.com/sc_req_item.do?sysparm_view=sys_popup

 Enter the Form Layout then switch/ensure you are in the sys_popup view.  Remove Variable Editor from the selected items and save.

 

Another approach is to set a read role permission on each variable definition

BradBowman_0-1733175243290.png

 

Thanks for your reply. Adding the read role to each variable would be a perfect approach if this was applicable only at the RITM/TASK level or if i could script the permission because I need those fields visible when a user is trying to submit the form.

for your first solution, modifying the sys_popup view, i haven't been able to get to it by using the URL, it sends me to a new record, maybe because we have the next experience active? not sure.

Sorry, I didn't explain that part which seems unexpected - when it opens a new record, that's where you want to be.  Just right-click the gray header bar and choose Configure > Form Layout, then switch the View name to Sys_popup and remove Variable Editor from Selected:

BradBowman_0-1733504044478.png

 

  

I do not see a view named sys_popup. I open a PDI and it is also not there (Xanadu). I'm still thinking this will not be a solution since the view will be changed for all requests, right? I only need to hide the variables for one catalog. Anyways... thanks for your help!