Get table name from the list view

Sudhir10
Tera Contributor

Hello,

 

I want to get the table name from the list view of the table using the script.

 

Any help will be appreciable.

 

Thanks.

1 ACCEPTED SOLUTION

Prathamesh G
Kilo Sage
Kilo Sage

Hello @Sudhir10,

 

You can use the 'getTableName()' in your script by either using 'current' or variable name you have declared to get the table name from the list view. 

 

var tableName = current.getTableName();

 

If the above solution resolve your issue, Please mark the solution as Accepted Solution and also mark it as Helpful.

 

Thank You.

Prathamesh

View solution in original post

5 REPLIES 5

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Sudhir10 

 

What is use case for this? Why you need table from list view. When you open any record in lis view then you know which table it is or check in address bar.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

I want to restrict some record from the current table but dont want to affect to the other child table. So i need to get the table name from the list view itself.

Prathamesh G
Kilo Sage
Kilo Sage

Hello @Sudhir10,

 

You can use the 'getTableName()' in your script by either using 'current' or variable name you have declared to get the table name from the list view. 

 

var tableName = current.getTableName();

 

If the above solution resolve your issue, Please mark the solution as Accepted Solution and also mark it as Helpful.

 

Thank You.

Prathamesh

Thank You Prathamesh. The solution you have provided is work.

 

Thank You so much.