Custom form to select SP List rows and save selected items into excel file

Shri-6058 326 Reputation points
2022-01-15T18:20:47.517+00:00

Hello,

I have an SP list with 1000-1500 records. I was asked to display in the custom form and user to select row selections(checkbox). I should allow them to save those selected rows into their computer(or any location they specify). I need to make sure to restrict 100 rows at a time for saving file(or providing validation prompt stating to select 100 rows max).

Is it possible to use SP client side application or Jquery inject option to perform this application? Otherwise, I have to move these records into sql server database. The main reason I chose this into SharePoint is because, I can use the out of the box auditing log to generate report on a monthly basis who accessed/downloaded etc.

Please advise.

Shri

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,227 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,690 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,675 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,575 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. RaytheonXie_MSFT 31,606 Reputation points Microsoft Vendor
    2022-01-17T02:27:30.62+00:00

    Hi @Shri-6058 ,
    You can use rest api to get all items in the list First.
    165458-test.txt
    Then you can use change event to limit 100 rows like following code which select 3 rows

       <div class="pricing-levels-3">  
          <p><strong>Which level would you like? (Select 3 Levels)</strong></p>  
          <input class="single-checkbox"type="checkbox" name="vehicle" value="Bike">Level 1<br>  
          <input class="single-checkbox" type="checkbox" name="vehicle" value="Bike">Level 2<br>  
          <input class="single-checkbox" type="checkbox" name="vehicle" value="Bike">Level 3<br>  
          <input class="single-checkbox" type="checkbox" name="vehicle" value="Bike">Level 4<br>  
          <input class="single-checkbox" type="checkbox" name="vehicle" value="Bike">Level 5<br>  
          <input class="single-checkbox" type="checkbox" name="vehicle" value="Bike">Level 6<br>  
          <input class="single-checkbox" type="checkbox" name="vehicle" value="Bike">Level 7<br>  
        </div>  
    
    
    var limit = 3;  
    $('input.single-checkbox').on('change', function(evt) {  
       if($(this).siblings(':checked').length >= limit) {  
           this.checked = false;  
       }  
    });  
    

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



  2. Shri-6058 326 Reputation points
    2022-01-17T21:37:45.93+00:00

    Thank you so much. This is exactly what I was looking. I guess I need to brush up my SPO skills as I have been doing on sp 2013