I have created a database view (between attachment & incident table)

utsavjaiswa
Giga Contributor

Hello Everyone, I have created a database view between attachment & incident table..with clause as:-

incident_sys_id=attachment_table_sys_id

By this clause it is working as expected.But suppose if a incident record is having 5 attachments then it is showing same 5 records differently..I want to make it a single to reduce the duplication.

Is there any way??

Warm Regards

Utsav

21 REPLIES 21

@utsavjaiswa OOB Case table also have the same attachment list. If you go to sys_attachment table, and search with table name and case sys_id in table_sys_id, you will get the records. You may need to configure the related list for case , incase that is not present.

 

Also, as mentioned by @Brad Bowman  , in database view you will get the same number of records as entries in the table so use reporting for your requirement. I dont think there is a need for database view here.


Raghav
MVP 2023
LinkedIn

@utsavjaiswa 

 

It is the same logic for case & attachment table. Any table that you see paper clip attachment icon, basically it attaches the file to sys_attachment table and creates a reference between the target table and attachment table. 

 

Below is for reference,

Bhuvan_0-1757688201119.pngBhuvan_1-1757688215985.png

As per community guidelines, you can accept more than one answer as accepted solution. If my responses helped to guide you or answer your query, please mark it helpful & accept the solution.

 

Thanks,

Bhuvan

@utsavjaiswa 

 

Did you get a chance to review this ?

 

I hope you appreciate the efforts to provide you with detailed information. If my response helped to guide you or answer your query, please mark it helpful & accept the solution.

 

Thanks,

Bhuvan

See, I understand your point, but suppose if I need to create a report based on the case data's and its attachment, then at that point of time I need to create a database view table???
correct??
need your input

Thanks in Advance
Utsav

@utsavjaiswa You can filter case attachments with table=<case table> but if you need case table data and attachment in same view, you will need database view itself.


Raghav
MVP 2023
LinkedIn