How to get the name/ ID of the specific Related list tab using script in UI Action ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2025 05:17 AM
Hi All,
I want to check Related list tab name or ID in the script. UI Action button is referring to 1 table. While working, its should execute as per the tab selection. So I need to check tab name in the script like if "A" tab is active then it should only go the relevant code and export the data.
How I could fetch Related List tab name using script ?
Regards,
Virendra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2025 06:10 AM
What is your usecase for calling a related list? You can just query to the related records on that tab.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2025 06:33 AM
what's your business requirement? share screenshots.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2025 07:28 AM
Hi @Ankur Bawiskar , @Mark Manders
Use case is,
This is custom table and per "Is Actual" value I will use below related tabs.
Below 2 related list tab is linked to above table with common "Export" button to export the data which is using above "customers Impacted" table commonly'
If "Customer Impacted" tab is active then I will export only "Is Actual=false" related data and vice versa for "Actual Customer Impacted" tab.
So for this, I need to check which tab (name) is active so that I can check that name in IF condition and can fire the query to export data.
Regards,
Virendra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2025 08:06 AM
I don't think it's a valid use-case.
I also feel it's not possible to determine which section is currently active unless you use DOM manipulation.
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