Set the view to default view when I open a form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2022 02:47 AM
Hi,
When I open a calculated application service form from the list view then the view is by default to some custom view "additional info" but I want that view to be the "default view". I am unable to set the view to default view for this form. I have gone through the view rules but still unable to understand how to achieve this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2022 02:55 AM
Hi Sumit,
In this thread, you will get detailed explanation:
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2022 03:15 AM
Hi,
If View rules are not giving proper results.
Use load client script:
use switchView(type,table,view); Use this function on client script
function onLoad() {
switchView('section','incident','default');
}
Hope it helps!!
Please Mark ✅ Correct/helpful, if applicable, Thanks!!
Regards
Pavankumar
ServiceNow Community MVP 2024.
Thanks,
Pavankumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2022 03:21 AM
Hey,
Do you mind sharing what exactly you have done at View rules level?
Also, in meantime go through below posts to gain better understanding at view rules.
Verifying if a view rule is defining the view on a form
ServiceNow View and View Rule
Feel free to mark correct, If I answered your query.
Will be helpful for future visitors looking for similar questions 🙂
Aman Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2022 03:28 AM
Hi Sumit,
Cause
There are a number of reasons the desired view may not be shown to a user. These include:
- A view rule which is forcing a different view.
- A business rule which is forcing a different view.
- A user preference is setup for a different view.
Resolution
The easiest way to know if a different view is being used is to right click the record and go to the View menu and see which view is selected. However, some users do not have access to that functionality. In that case open the target record in it's own tab without the rest of the navigation pane which will allow you to see the URL for the record and see what the view is. You can do this as follows:
- Display a list of records from the table that you want to check (such as incident).
- Open one of the records in a new browser tab using a mechanism such as holding down the windows key and clicking the record ID in the list, or right clicking and choosing Open in a new window.
- You will then see the full URL of the record in the tab such as:
https://myinstance.service-now.com/incident.do?sys_id=3ed3e2172b8631006c59ae6219da1585&sysparm_recor... - Check the URL and locate sysparm_view. If no view is specified then the default view should be used but if you see a different view being used then this could explain why your field is not being displayed.
- If a different view is being used you should check the following:
- Go to System UI > View Rules and check for any view rules for your table which might apply.
- Search business rules to see if any that are defined could impact view. These will have the text <tablename>GetViewName referenced in the script field where <tablename> would be replaced with the actual table name. For example, if it is the incident table that would be incidentGetViewName.
- Check if the affected user(s) have system preferences with defined view that is different than expected. User preferences will have the name <tablename>.view where <tablename> is replaced with the actual table name such as incident.view.
Mark Correct or Helpful if it helps.
Thanks.
Yousaf
***Mark Correct or Helpful if it helps.***