I store data in one table and files in a separate table in SQL. Currently they way stored procedure is written it finds multiple attachments tied to one record via a request ID Number, joins the records and then repeats record data like this for each attachment:
ID------Create Date------Created By--------Status------File Name-------------Click on image to Launch
I would suggest not to show the list of attachments in the grid. Rather show just a line saying 'View Attachments'. Upon clicking link, show list of attachments so that user can view/download the attachment.
Member
138 Points
302 Posts
Show multiple attachment icons on the same row or in a grouped format in a HTML table
Apr 04, 2018 08:47 PM|johnzee|LINK
I have a HTML table that shows a records with file name and attachments also. Here is some of the table HTML:
<div class="row">
<div class="col-md-6">
<label>Created By</label>
<input id="txtCreatedBy" class="form-control input-sm" ng-model="vm.CreatedBy" >
</div>
</div>
<div class="row">
<div class="col-md-6">
<label>Status</label>
<input id="txtStatus" class="form-control input-sm" ng-model="vm.Status" >
</div>
</div>
<table class="table table-hover table-condensed" style="font-size:10px !important">
<thead>
<tr>
<th>File</th>
<th>Attachment</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{vm.FileName}}</td>
<td >
<button ng-click="vm.getFile(vm.DocId)"><img ng-src="{{vm.fileImage}}" style="height:20px;width:20px" /></button>
</td>
</tr>
</tbody>
</table>
I store data in one table and files in a separate table in SQL. Currently they way stored procedure is written it finds multiple attachments tied to one record via a request ID Number, joins the records and then repeats record data like this for each attachment:
ID------Create Date------Created By--------Status------File Name-------------Click on image to Launch
01------John Smith-------04/01/2018--------In Review---expense.xls-----------<Excel icon image>
01------John Smith-------04/01/2018--------In Review---phonebill.pdf---------<PDF icon image>
01------John Smith-------04/01/2018--------In Review---Instructions.docx-----<MSWord icon image>
So if it finds 3 attachments it returns 3 records, one for each file attachment. How can I show the record on one line either like this:
ID------Create Date------Created By--------Status------File Name-----------------------------------------------Click on image to Launch
01------John Smith-------04/01/2018--------In Review---expense.xls, phonebill.pdf, Instructions.docx-----------<Excel icon image>,<PDF icon image>,<MSWord icon image>
Or in a Group so the whole record doesn't repeat and shows 3 rows in the table:
ID------Create Date------Created By--------Status------File Name-------------Click on image to Launch
01------John Smith-------04/01/2018--------In Review---expense.xls-----------<Excel icon image>
--------------------------------------------------------------phonebill.pdf---------<PDF icon image>
--------------------------------------------------------------Instructions.docx-----<MSWord icon image>
Participant
1624 Points
792 Posts
Re: Show multiple attachment icons on the same row or in a grouped format in a HTML table
Apr 09, 2018 10:33 AM|rajesh93180|LINK
Hello johnzee,
I would suggest not to show the list of attachments in the grid. Rather show just a line saying 'View Attachments'. Upon clicking link, show list of attachments so that user can view/download the attachment.
Thanks
RajeshV.
Mark as answer if you find this post helpful.
Member
138 Points
302 Posts
Re: Show multiple attachment icons on the same row or in a grouped format in a HTML table
Apr 09, 2018 12:54 PM|johnzee|LINK
Thank you for your suggestion. I will continue to research more and if I can't find a solution then I will use this as a last resort.
Thanks again
John