- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2023 10:02 PM
I want to control the display/hide of tabs depending on the value of the related list.
I want to control the display/hide of tabs depending on the value of the related record.
Regarding the display format of the tabs, we are considering two methods: related lists and creating section tabs and embedding the list in the form.
As an example of a related list, I would like to control the display/hide of the tab in the red frame according to the value of the record in the blue frame in the image.
If you know how, please let me know.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2023 10:17 PM
that's possible
1) use display BR on your Incident table and determine the flag if tab needs to be shown/hidden
2) then use onLoad client script on Incident table and based on the flag show/hide the tab
g_form.setSectionDisplay('tabName', false);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2023 10:17 PM
that's possible
1) use display BR on your Incident table and determine the flag if tab needs to be shown/hidden
2) then use onLoad client script on Incident table and based on the flag show/hide the tab
g_form.setSectionDisplay('tabName', false);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2023 11:53 PM
@Ankur Bawiskar
thank you for your reply.
"1)use display BR on your Incident table and determine the flag if tab needs to be shown/hidden"
Please explain in detail because I don't understand this part very well.
What should I set for this BR?
I don't understand how to control it depending on the value of the record in the related list.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2023 12:36 AM
in that display BR you should query the related list table record and based on field value comparison set the g_scratchpad variable
To find more on scratchpad variable check in docs
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2023 12:50 AM
Thank you for letting me know more about Display BR.
I'll look into the g_scratchpad variable and give it a try.