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

Virendra K
Kilo Sage

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

7 REPLIES 7

Mark Manders
Mega Patron

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

Ankur Bawiskar
Tera Patron
Tera Patron

@Virendra K 

what's your business requirement? share screenshots.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Virendra K
Kilo Sage

Hi @Ankur Bawiskar , @Mark Manders 

 

Use case is,

 

This is custom table and per "Is Actual" value I will use below related tabs. 

VirendraK_0-1739459547052.png

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'

VirendraK_1-1739460160639.png

 

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

 

@Virendra K 

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.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader