2

I am working on a SharePoint list and I have a query. Is it possible to have two attachment fields. I have one attachment field already but I require one more add attachment option to upload an image which will be later added to the mail body which will trigger when a new item is added to the SharePoint list. I am using infopath. Request you to please suggest. :)

2 Answers 2

1

As your need to attach the image file, then you can try with creating the Picture type column or you can maintain the separate document library for the attachments which is more recommended - you can refer to the below article why we should not attach the document to SharePoint list rather should go with document library.

Why you should never attach documents in a SharePoint list

Directly with out of the box we can't add attachment column, there is some workaround, please refer to the below article :

Steps:

  1. Create column of type"Choice".   Name it "Status".   Add Values "Red", "Yellow", "Green".

  2. Create a calculated column. Name it "SW".  Add the below calculation.

Note:  

The above calculation will set an ID for each item for SW column. And also it will change the color for every status change in "Status" column.

  1.  Edit the page, and add a content editor web part.

  2. Create a file and add the below JQuery script in that file. 

    <script src="https://<site path>/Test_DoC_lib/jquery-1.11.3.min.js" type="text/javascript"></script>
    
    <script type="text/javascript">
    $(document).ready(function()
    {
    $('.SW_status_id').click(function()
    {  
    
     var id =$(this).closest('tr').attr('iid').split(',')[1];
     window.open("https://<site 
      path>/Lists/Test_AddAttachments_list/Attachments/" + id + 
     "/My_excel_file.xlsx");
      }); 
    
     $('.HW_status_id').click(function()
     {
    
    
      var id =$(this).closest('tr').attr('iid').split(',')[1];
    
    
      window.open("https://<site 
      path>/Lists/Test_AddAttachments_list/Attachments/" + id + 
     "/Test_Excel_template.xlsx");
       });
    
     });
    </script>
    
  3.  Upload this file in a document library.

  4. Get this file path from the document library and set this path in the content editor web part.

  5. Save and publish.

Now work is done !!!

Source :

Solution for creating multiple Attachment column in SharePoint list

1

not out of box but you can do it with different options.

using the Jquery (Read more about it here)

  1. Creation of Browse Button Using Tag.

  2. Read the Uploaded Multiple files and keeping it in an Array using Jquery

  3. Adding Attachments to the List Item using SPServices

Or you can use multiple document library / lists.

https://stackoverflow.com/questions/1184024/multiple-attachments-columns-in-sharepoint-lists

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.