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 As mentioned earlier and as @Brad Bowman   mentioned, if you go by database view, the number of rows will not decrease, thats how database views and "Joins" work.


Raghav
MVP 2023
LinkedIn

Brad Bowman
Kilo Patron
Kilo Patron

We don't really know what you are trying to accomplish, so maybe an example will help.  Here is a Database View showing one Case with one attachment, and one Case that has 3 attachments.  The first 3 columns are from the Case table, the last 3 columns are from the Attachment table.

BradBowman_0-1758031317015.png

Instead of a report or list that displays like this, showing one row for each attachment record, what is it that you want to see? Do you need to see attachment data other than the File name?  Does the File name / attachment appearance need to be a link which downloads the file?

 

Hello @Brad Bowman  
As per the data you have shown above, I want to have see this record--CMPL00002 as 1 time instead of three times repeats in list view.[since, the same record is having 3 attachments, and I do not want to see the data 3 times, is there any way??]

So, my requirement is to make it as a single record.

Thanks in Advance
Utsav

The closest to that I can come up with using a simple list view or report is a pivot table on the database view, which would look something like this

BradBowman_0-1758115774880.png

or this with more data displayed - you can choose the row and column fields:

BradBowman_1-1758115851963.png

On each you can drill-down / click-through to see the underlying records in a list view.

 

 

Hey, @Brad Bowman  

Really appreciating for your reply
But is there any way I can make a change in where clause under the database view, so that duplicate record should not repeat.

Thanks in Advance
Utsav