I am new to SharePoint. I have been learning from videos online and am still unable to do something that I feel should be very simple. I have a SharePoint page where I want a form to show up (no Add to list +) where users can input information and upload an excel spreadsheet - I want the form-filled data to to write to a SharePoint list and I'd like the uploaded spreadsheet to be saved in a document library. Any suggestions with using SP out of the box? I could potentially use InfoPath / or SP designer if necessary. Any help or point in the right direction is very much appreciated!
1 Answer
Any reason you're saving the spreadsheet to a separate library? I'd recommend one of the following:
- Upload the file as an attachment to the list
- Upload the file to the library, and configure the library to have additional fields instead of using a list
Either of the above results in the data and file being stored together.
If you use a list with attachments, you could create a link to the "new" form of the list, and use that instead of a custom page.
InfoPath would also work, but the default infopath route would result in the field and file being stored in the same list/library, as above.
It is possible to add a list item and upload a document to a separate library from the same screen, but that is not nearly as common as the above options, and so is not an OOB option. To do it would require JavaScript, or Power Apps, or two web parts on the same page, possibly connected. Or, simply have the user go through a multi-page process, where they first add a row to the list, and then upload the doc.