Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Search Table name based on field name

sushil sinha
Giga Contributor

I have list of fields.

I have to  find the tables in which fields are present.

There are lot of tables and all fields are not in same table.

So can I search tables based on field name.

It is very difficult to go through each table and type column name.

Can anyone help?

1 ACCEPTED SOLUTION

Priyanka136
Mega Guru

Hi sushil sinha,

Navigate to - 'sys_documentation.list'

That will give you all the field labels in ServiceNow.

Refer this link:-

https://wiki.servicenow.com/index.php?title=Data_Dictionary_Tables#Field_Labels

https://community.servicenow.com/community?id=community_question&sys_id=c55ffe69db58dbc01dcaf3231f96...

I hope this helps. Please mark correct/helpful based on impact...!!!!

Warm Regards,

Priyanka

find_real_file.png

www.dxsherpa.com

 

View solution in original post

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Sushil,

I would recommend to have script background or fix script to check these. Sample script below. I assume you must be having the column name and not column label and they should be unique. such as short_description will be present on many tables

var columnArray = ['short_description','comments'];

for(var i=0;i<columnArray.length;i++){

var gr = new GlideRecord('sys_dictionary');

gr.addQuery('element', columnArray[i]);

gr.query();

var tableArr = [];

gs.print('Column is: ' + columnArray[i]);

while(gr.next()){

tableArr.push(gr.name.toString());

}

gs.print('Table is: ' + tableArr);

}

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

Thanks Ankur

Priyanka136
Mega Guru

Hi sushil sinha,

Navigate to - 'sys_documentation.list'

That will give you all the field labels in ServiceNow.

Refer this link:-

https://wiki.servicenow.com/index.php?title=Data_Dictionary_Tables#Field_Labels

https://community.servicenow.com/community?id=community_question&sys_id=c55ffe69db58dbc01dcaf3231f96...

I hope this helps. Please mark correct/helpful based on impact...!!!!

Warm Regards,

Priyanka

find_real_file.png

www.dxsherpa.com