- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2017 06:17 AM
Hi
Assume that the user resolved and saved the last incident, which placed him on the "Closure Information" tab/section.
When he opens another incident or starts a new one, he should always focus on the "notes" tab/section, not on the "Closure Information".
I have tried different things including this: Re: Re: Default Focus Field on Incident Form Load
Can you give me a hint?
Thanks
Soren
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2017 08:44 AM
You are correct. I thought I read about setting focus in there somewhere.
If you want to force the tab to always be the default, you would have to work with the appropriate record in sys_user_preference. The user preference always remember the tab the user selected last. You would have to create (or update) the record to the value you wanted. Here's an example of the value I see when I click the Notes tab on incident (tab #0). Note the value is empty. When I click the next tab, it gets set to 1.
If you want this to be the default, you could write an business rule on sys_user_preference that watches for specific names getting updated and force them to a value.
The problem I see in this is when I'm working on tab #2 (the third from the left), enter some information and save, the form is going to redraw and force me to the first tab again. As a user, this could get annoying. "Hey, I was just working over there, why am I thrown back here?"

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2017 06:25 AM
Hi Soren,
I wouldn't recommend that solution, even if it did work because it employs DOM manipulation. Using this is a bad practice as it is likely to break in future upgrades when the DOM changes (as it has in the past.)
Take a look at getSections() and setSectionDisplay() methods in the GlideForm page. You can use a client script that calls the g_form methods to identify which sections are available and select the appropriate one.
https://developer.servicenow.com/app.do#!/api_doc?v=jakarta&id=c_GlideFormAPI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2017 11:26 PM
Hi Chuck
Shouldn't setSectionDisplay() not only be used when you want to hide a section/tab ? (not change focus)
BRs
Søren

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2017 08:44 AM
You are correct. I thought I read about setting focus in there somewhere.
If you want to force the tab to always be the default, you would have to work with the appropriate record in sys_user_preference. The user preference always remember the tab the user selected last. You would have to create (or update) the record to the value you wanted. Here's an example of the value I see when I click the Notes tab on incident (tab #0). Note the value is empty. When I click the next tab, it gets set to 1.
If you want this to be the default, you could write an business rule on sys_user_preference that watches for specific names getting updated and force them to a value.
The problem I see in this is when I'm working on tab #2 (the third from the left), enter some information and save, the form is going to redraw and force me to the first tab again. As a user, this could get annoying. "Hey, I was just working over there, why am I thrown back here?"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2017 12:56 AM
Thanks!
I will try it - but you are correct that it could be really annoying for the user!!
BRs
Søren