Can a View rule hide the Default view from the list of Views?

Kumar60
Kilo Expert

Hello All,

Lets take a table incident.Go to the list view i.e incident.list.Click on the context menu Views as showed in the screenshot.I would like to hide the default view from some users.Is it possible through view rule?If not how to do this.

I hope the view rule is to set the view to the user,not to show in the mentioned list.Correct me if I'm wrong. :)Thanks in advance.

1 ACCEPTED SOLUTION

DirkRedeker
Mega Sage

Hi

Yes, this is possible...

 NOTE: Always check this out in QA / TEST instance FIRST !!!!

find_real_file.png

As admin, go to 

> System UI > Views

In the List, open the record for the "Default View" (see screenshot below):

find_real_file.png

In the Form, scroll down to the Related Lists:

find_real_file.png

Select the "Lists" Related List and filter it for the table, where you want to Limit the "Default View" (to be disappeared). (see screenshot above) Filter the List by the table "incident" (for example).

If there are already Records for the table on the specific user, where you want to remove the "Default View", you need to delete those records for this user first.

The one with the "user" column set to "(empty)" is the one NOT specific to any user, which are valid for ALL.

Open this record, and (for testing purposes), set this one to "some" user different to the one where you want the default view to be disappeared - save the record.

Now, the Default view disappears from the selection in the User Menu!

BUT: it just disappears, once this user has selected a View DIFFERENT to the "Default View" (which you can predefine as well). As long as he is/was showing the "Default View", it will also remain in the menu (visible). It disappears (like in the first screenshot), as soon as the user switches Views. 

Let me know, if that answers your question, please.

BR Dirk

View solution in original post

13 REPLIES 13

Hi Kumar,

whatever is set in the answer variable gets applied as the view name for that user

there is out of the box is_list which says whether it is a list view; you can try using that

https://docs.servicenow.com/bundle/kingston-platform-user-interface/page/administer/navigation-and-u...

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Azim Kazi
Giga Guru

Hi Kumar,

 

Take a look here:

http://wiki.servicenow.com/index.php?title=View_Management#Creating_a_View_Rule

 

http://wiki.servicenow.com/index.php?title=Restrict_Form_Views_by_Role

 

Hope it will help you!!

If my response helps you then kindly mark my answer helpful 👍and correct ✔otherwise if any query 🤔 feel free to ask further.

 

Thanks,

Ajim.

DirkRedeker
Mega Sage

Hi

Yes, this is possible...

 NOTE: Always check this out in QA / TEST instance FIRST !!!!

find_real_file.png

As admin, go to 

> System UI > Views

In the List, open the record for the "Default View" (see screenshot below):

find_real_file.png

In the Form, scroll down to the Related Lists:

find_real_file.png

Select the "Lists" Related List and filter it for the table, where you want to Limit the "Default View" (to be disappeared). (see screenshot above) Filter the List by the table "incident" (for example).

If there are already Records for the table on the specific user, where you want to remove the "Default View", you need to delete those records for this user first.

The one with the "user" column set to "(empty)" is the one NOT specific to any user, which are valid for ALL.

Open this record, and (for testing purposes), set this one to "some" user different to the one where you want the default view to be disappeared - save the record.

Now, the Default view disappears from the selection in the User Menu!

BUT: it just disappears, once this user has selected a View DIFFERENT to the "Default View" (which you can predefine as well). As long as he is/was showing the "Default View", it will also remain in the menu (visible). It disappears (like in the first screenshot), as soon as the user switches Views. 

Let me know, if that answers your question, please.

BR Dirk

Having the same issue, apparently is a bug