Getting a list of attachments in a report

Panagiotis Kons
Tera Expert

Hello, we have a screen in ServiceNow where we can register new vendors. We also attach some files with the vendor registration. I am trying to create a report to list all vendor details as well as the attachment names. I can list all vendor details (taken from table u_vendor) but not the attachments (in table sys_attachment). Any idea how I can join the two tables and also get the attachment names?

 

Thank you

1 ACCEPTED SOLUTION

kamlesh kjmar
Mega Sage
Mega Sage

Hi @Panagiotis Kons ,

 

You can try the below way, I am showing joining incident and attachment. You can try same with your table

 

1. Create Database view for this as shown below

kamleshkjmar_0-1667912788777.png

 

2. In the related list create two records, one for vendor table and another for attachment table and use the where clause to join both the table. Condition is "attachment's table sys id = vendor's sysid

kamleshkjmar_0-1667912632179.png

 

kamleshkjmar_1-1667913282200.png

 

 

I hope this helps

 

Regards,

Kamlesh

View solution in original post

3 REPLIES 3

kamlesh kjmar
Mega Sage
Mega Sage

Hi @Panagiotis Kons ,

 

You can try the below way, I am showing joining incident and attachment. You can try same with your table

 

1. Create Database view for this as shown below

kamleshkjmar_0-1667912788777.png

 

2. In the related list create two records, one for vendor table and another for attachment table and use the where clause to join both the table. Condition is "attachment's table sys id = vendor's sysid

kamleshkjmar_0-1667912632179.png

 

kamleshkjmar_1-1667913282200.png

 

 

I hope this helps

 

Regards,

Kamlesh

Thank you, it worked.

Hi,

I am able to get the attachment on the report in service now. But once I export it to csv/excel the attachment link is a plain text and not clickable. Just file name is appearing. Any way to get the links clickable?not clickable.PNG