locked
Show multiple attachment icons on the same row or in a grouped format in a HTML table RRS feed

  • Question

  • User1793652459 posted

    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>

    Wednesday, April 4, 2018 8:47 PM

Answers

  • User-492460945 posted

    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.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, April 9, 2018 10:33 AM

All replies

  • User-492460945 posted

    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.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, April 9, 2018 10:33 AM
  • User1793652459 posted

    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

    Monday, April 9, 2018 12:54 PM