- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2017 02:21 AM
Dear All,
Is there a way to make a section / tab of a form available, depending on the group?
Suppose, I am a member of ABC group. I log into the system and opens a particular form, which has 5 sections / tabs for 5 different group members. As per my requirement, when I log into the system and open the form, it should automatically select the ABC tab / section (say, it is the 3rd section / tab in the form), so that user need not to click on different tabs before opening the tabs related to his group.
Any help on this would be much appreciated.
Regards,
Sumana
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2017 07:40 AM
Hi Sumana,
You can do it with a UI policy and a script include.
Script include:
Name: findUserGroup
Client callable: yes
UI Policy:
Several small things to note:
1. The line with the sys id: you can return the group name from the script include. However, if you change the group name for some reason, you will also have to change the ui policy script.
2. You will have to repeat lines 11-12 for each group, wahc each with its sys_id and position on the page.
3. The user must be in only one of the 5 groups, or, if in more than one, then the focus would be on the first group encountered. If you want to go through all of them, you'd need an array in the GlideAjax, and to split the array in your ui policy and find the right group.
harel
Edit:
I am sorry for the screen shots. When I try to paste the text itself, I get an error:
Your content could not be saved due to an error. You may have been logged out. If this problem persists please contact your system administrator. Click here to refresh this page.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2017 02:26 PM
Check out link below but also look for the function on the developer site.
GlideForm (g form) - ServiceNow Wiki

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2017 02:52 PM
I would solve this by using a Business Rule to check group memberships with isMemeberOf, and populate the results into the scratchpad. Then use an onLoad Client Script to hide or show the sections:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2017 02:37 AM
Hi Geoffrey,
Thank you for the reply. But i do not want to make any section hidden. All 5 sections will be visible to all the group members but I want the section, to remain selected when any user of that particular group logs in.
For example, if I am a 'service desk' group member and i log into the system & open the particular form, the 'service desk' section (may be the 3rd tab / section in the form) will be selected for me for filling up the data but i can also click on other 4 tabs to see the data in those sections.
Please let me know if you need any further clarification.
Regards,
Sumana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2017 07:40 AM
Hi Sumana,
You can do it with a UI policy and a script include.
Script include:
Name: findUserGroup
Client callable: yes
UI Policy:
Several small things to note:
1. The line with the sys id: you can return the group name from the script include. However, if you change the group name for some reason, you will also have to change the ui policy script.
2. You will have to repeat lines 11-12 for each group, wahc each with its sys_id and position on the page.
3. The user must be in only one of the 5 groups, or, if in more than one, then the focus would be on the first group encountered. If you want to go through all of them, you'd need an array in the GlideAjax, and to split the array in your ui policy and find the right group.
harel
Edit:
I am sorry for the screen shots. When I try to paste the text itself, I get an error:
Your content could not be saved due to an error. You may have been logged out. If this problem persists please contact your system administrator. Click here to refresh this page.