- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2024 01:55 AM
Hello,
I want to get the table name from the list view of the table using the script.
Any help will be appreciable.
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2024 01:59 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2024 01:58 AM
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]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2024 02:02 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2024 01:59 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2024 02:03 AM
Thank You Prathamesh. The solution you have provided is work.
Thank You so much.