We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

View Rules - Force the DEFAULT view? Not working

Duncan Pederse1
Giga Expert

Has anyone ever used a View Rule to force users to see the 'Default view'? I checked in sys_ui_view and it seems the Default view does not have a name (it is empty). Therefore I do not know what to return from my view rule. I am returning an empty string, but it is still allowing the users to change the view.

7 REPLIES 7

Jagadeesh R1
Tera Expert

Hello,

   Assuming that users are accessing the records from a module taking them to a list of records and then users are selecting a record from the list (i.e  Incident-->Open--->record). You can enforce the user preference of the view in the module arguments

sysparm_userpref.tablename_list.view=viewone&sysparm_userpref.tablename.view=viewtwo

 

So for example if you want to enforce users to have a default list view for incident list and record from module, you can give below arguments

sysparm_userpref.incident_list.view=&sysparm_userpref.incident.view=

Since default view has no value I have replace the viewone and viewtwo with blanks 

 

Regards,

Jagadeesh

Hi,

Thanks so much for this response!! I've spent so much time before I finally saw this solution.
What a relief that finally something works.

Maybe the only remark is that it worked for me in this form:

&sysparm_userpref.incident.view=default

Thanks again,
Aniko

pawan k singh
Kilo Sage

You can create a view Rule like below.

find_real_file.png

Please mark this answer correct, if it helped you!

Regards

Pawan K Singh