Automatically upload documents to list items in Sharepoint Online

Hi
I need to upload pdf documents to a list (not
a document library, this is not an option) on SharepointOnline (Office365).
In practice, whenever a document is "sent" or "uploaded" to the list, a new list item would be created automatically and the document would be attached to the list item automatically.
 At the moment, we are doing this manually but this is not practical with 1,000s of documents.
Any help would be appreciated. The community365 people were unable to help and redirected me here.
Many thanks,
AK

For those who may be interested, I found a workaround that does the trick.
Rather than uploading the actual documents to each list item, I upload the documents to a document library and then include hyperlinks to the locations of the documents in the document library.
This can be achieved by:
(i) creating a new workflow in Sharepoint Designer;  the workflow must be attached to the document library where the documents are located AND must be set to launch automatically when a new item is created in the library (see the parameters of the workflow);
 and
(ii) in the workflow, choose the action "create a new item"; click on "this list" and choose your destination list; choose a list column where the hyperlink will appear and click on "add" to add a field directing towards that column; choose "Current Element/Encoded
Absolute URL" as the source of data. And bam! it works. A life saver.
Cheers
AK

Similar Messages

  • Is it possible for a 3rd party program to create a list item in sharepoint online 2013?

    I have limited experience with the online version of sp. I've been asked if it's possible for a 3rd party app that our company is beginning to use, to programmatically add items to a list.    I don't have any details about the program yet,
    but I've been told that a batch would run at night and they would like it to create items in a SP list and pass along several fields of metadata.   
    Is this possible in the online version?   I know that Power Shell can do this, but is it possible for an app to get access to run a PS command?   
    thanks,

    Yes.
    There is something known as the Client Side (?) Object Model or CSOM. This allows you to create list items, lists and even sites with .Net code from a non server machine.
    You could run 'classic' Server Object Model  C#/VB.NET or PowerShell to do the same job and it might be easier as there's alot more material out there on how to do it. On the other hand it's probably going to make your solution more complicated and
    harder to maintain over the long run.
    This article introduces you to the CSOM and how to use it and is applicable to O365 as well as on-premise:
    http://msdn.microsoft.com/en-us/library/office/fp179912%28v=office.15%29.aspx
    As an alternative you can look at the REST API which allows you to use web services to interact with SharePoint.
    http://msdn.microsoft.com/en-us/library/office/fp179912%28v=office.15%29.aspx

  • Create list item in sharepoint online list throws error in iPhone

    Hi all :
    I have got a piece of JS code where I am creating multiple list items. So first I am creating an Expense item and then each of the expense line item( 5 of those ) in a different list. It creates the Expense item successfully and then when it tries to
    create the line items, I am getting the following error :
    Request failed. Unexpected response from server. null
    However when I go to the line items list, I can see all the items being created!!! I am also inserting my code below.
    clientContext.executeQueryAsync(function (sender, args) {
                    var createdExpenseID = viewModel.listItem.get_id();
                    //Now create the expense line items - one by one
                    clientContext = SP.ClientContext.get_current();
                    web = clientContext.get_web();
                    list = web.get_lists().getByTitle("Expense Items");
                    var expenseIDLookup = new SP.FieldLookupValue();
                 expenseIDLookup.set_lookupId(createdExpenseID);
                    /*for (i = 1; i <= 5; i++) {
                        var descriptionField = "description"+i;
            alert(viewModel.model.window[descriptionField]);
                    itemCreateInfo = new SP.ListItemCreationInformation();
                 this.listItem = list.addItem(itemCreateInfo);           
                 //alert(list);
                 this.listItem.set_item('Title', viewModel.model.description1());
                 this.listItem.set_item('Date', $('#date1').val());
                 this.listItem.set_item('ProjectNumber', viewModel.model.projectNumber1());
                 this.listItem.set_item('ClientToPay', viewModel.model.selectedClienttopay1());
                 this.listItem.set_item('Amount', viewModel.model.amount1());
                 this.listItem.set_item('ExpenseCurrency', viewModel.model.selectedExpenseCurrency1());
                    this.listItem.set_item('ExchangeRate', viewModel.model.exchange1());
                    this.listItem.set_item('ConvertedAmount', viewModel.model.converted1());
                    this.listItem.set_item('Expense', expenseIDLookup);
                    this.listItem.update();
                    clientContext.load(this.listItem);
                    clientContext.executeQueryAsync(function (sender, args) {
        function (sender, args) {
                     alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
                    itemCreateInfo = new SP.ListItemCreationInformation();
                 this.listItem = list.addItem(itemCreateInfo);           
                 //alert(list);
                 this.listItem.set_item('Title', viewModel.model.description2());
                 this.listItem.set_item('Date', $('#date2').val());
                 this.listItem.set_item('ProjectNumber', viewModel.model.projectNumber2());
                 this.listItem.set_item('ClientToPay', viewModel.model.selectedClienttopay2());
                 this.listItem.set_item('Amount', viewModel.model.amount2());
                 this.listItem.set_item('ExpenseCurrency', viewModel.model.selectedExpenseCurrency2());
                    this.listItem.set_item('ExchangeRate', viewModel.model.exchange2());
                    this.listItem.set_item('ConvertedAmount', viewModel.model.converted2());
                    this.listItem.set_item('Expense', expenseIDLookup);
                    this.listItem.update();
                    clientContext.load(this.listItem);
                    clientContext.executeQueryAsync(function (sender, args) {
        function (sender, args) {
                     alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
       //Now redirect to the newly created item edititem.aspx page for attaching attachments
                    window.location.replace("/sites/process/Lists/Expense/EditForm.aspx?ID="+createdExpenseID+"&Source=/sites/process");
    function (sender, args) {
        alert('Expense creation failed');                
    The outermost executeQueryAsync creates the Expense item and on being successful, I create the line items.
    Any help will be much appreciated.
    Thanks and regards,
    developer_melbourne

    Ok so I resolved the issue and thought to provide the answer. It was caused by the line where it is doing redirection using window.location.replace. Somehow it works in IE, not in Safari in iPhone.
    Anyways you can do the redirection after all the items get created in the last success  method of the last item creation OR you can use deferred/promise of jQuery to achieve the same.
    Thanks

  • FAQ - Print a List Item in SharePoint 2010

    FAQ - Print a List Item in SharePoint 2010
    step 1) Open a List;
    step 2) Hit the List tab;
    step 3) Click the Form Web Parts dropdownlist;
    step 4) Choose “Default Display Form”;
    step 5)At the top of the Page – Insert Tab, Click the Web Part button to add a new Content Editor web part (CEWP);
     step 6) From Categories choose “Media and Content” > “Content Editor” and add it to the main section of the page;
     Click the “Click here to add content” and then click the HTML button in the Ribbon to bring up the Edit source code window;
     In the window add the following code to display a Print Button at the top of the list item window.
    input type=”button” value=” Print” onclick=”window.print();return false;” 
    step 7) Next, hit the Page tab at the top of the page to view the List item. You should see the Print button;
     Hit the Print button to print just the list item.
    Amalaraja Fernando,
    SharePoint Architect
    This post is provided "AS IS" with no warrenties and confers no rights.

    References:
    http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/28f02631-2291-4f8c-875a-4fa5397536ee/
    Amalaraja Fernando,
    SharePoint Architect
    This post is provided "AS IS" with no warrenties and confers no rights.

  • How to display the count of a list item in Sharepoint Designer?

    How to display the count of a list item in Sharepoint Designer? please reply with the proper code line to add for this.

    Hello,
    What version of sharepoint you are using? Try below approach:
    http://sharepointlogics.com/2010/03/total-count-of-items-in-list-in.html
    Hope it could help
    Hemendra: "Yesterday is just a memory,Tomorrow we may never see"
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
    you see a reply being an answer to the question of the thread, click "Mark As Answer
    Please feel free to unmark answer if does not resolves your problem.

  • Attach multiple files to a List Item in SharePoint 2013

    Hi Guys,
    I have a customer that want to attach multiple files to single list item in a dialog box. like Datasheet View, if we set up a Datasheet View and click on the Attachment cell, it opens a dialog box that allow to select and attach multiple files as one operation. 
    Does anyone know how to solve this issue?
    As we know, if we want to attach multiple files, it only allow me to attach one file at a time, then repeat this process for every other file.
    Thanks in advance!
    Jodie

    Hi,
    According to your post, my understanding is that you wanted to upload multiple files in SharePoint list.
    There is no out of the box way to accomplish this with SharePoint.
    You can refer to the following articles to achieve it programmatically.
    Multiple Upload File Programmatically Using GridView:
    http://kamilamirul.wordpress.com/2013/01/19/multiple-upload-file-programmatically-using-gridview/
    Upload multiple files attached to a SharePoint list item.
    http://nestorrg-blogs.itequia.com/2010/01/upload-multiple-files-attached-to.html
    Programatically Upload Multiple File in SharePoint List
    http://social.technet.microsoft.com/wiki/contents/articles/2990.programatically-upload-multiple-file-in-sharepoint-list-part-2.aspx
    Programmatically uploading multiple files to Custom sharepoint list 
    http://www.c-sharpcorner.com/UploadFile/sarav82/MOSS11072007065009AM/MOSS.aspx
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Is there any option for voting on a list item in SharePoint 2013?

    Dear All,
    I am looking for a feature vote a for list item from multiple users and need to show consolidated results on that.
    for SharePoint 2013 we have "like", "rating" by using these can we show the consolidated results.
    otherwise is there any alternative for this.
    Thanks & Regards,
    Jithendar

    I haven't seen any OOB vote feature in sharepoint list. It's better to go with "like" or "ratting" options.
    Adnan Amin MCT, SharePoint Architect | If you find this post useful kindly please mark it as an answer :)

  • How to update selected list items in SharePoint 2010?

    Hello All
    I have a list containing field named "Category". I want to develope a solution which will take two inputs: Old Category and New Category. The expected result is: all the list items will be fetched which have Old Category input value in
    their category field and the field is replaced with the input value New Category.
    I have a limitation that I can not use Visual Studio. So I am thinking to create aspx page with content editor webpart. But I am new to all these things. Could you please suggest the development approach for this?
    Thanks.

    Hello,
    I don't think CEWP can help you because you won't be able to find old and new category when there is any change in list. However you can identify the latest modified item from list but how will you identify whether category is old or new. If you have any
    other column in list which can tell you that category value has been updated then you can write ECMA or Jquery script to update other items.
    If have any column in list then see below jquery code, where you will see how to query the list: (In my case it is Active)
    var soapEnv = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'><soapenv:Body><GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'>";
    soapEnv += "<listName>Highlights</listName>";
    soapEnv += "<query><Query><Where><Eq><FieldRef Name='Active' /><Value Type='Text'>Yes</Value></Eq></Where><OrderBy Override='TRUE'><FieldRef Name='Modified' Ascending='FALSE' /></OrderBy></Query></query>";
    soapEnv += "<viewFields><ViewFields><FieldRef Name='Title'/><FieldRef Name='ows_FileLeafRef'/><FieldRef Name='Links'/></ViewFields></viewFields><rowLimit></rowLimit>";
    soapEnv += "</GetListItems></soapenv:Body></soapenv:Envelope>";
    Please comment if i misunderstood you?
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Automatic upload of content area items from the O/S

    I wish to automate the upload of content area items into the portal. Can this be done via the PDK or otherwise?
    I have a number of PDF and HTML reports that get generated and placed into a physical directory on the server. I want all these files from a specific directory to be uploaded as items into the portal automatically so that users can view the reports with appropriate security. The reports can be modified so that when run they insert a record into a custom table to store their path and file names. This can be used by a custom procedure to point to the files at the point of upload.
    However, can this upload actually be done?
    Any ideas on how to do this would be useful.
    Regards,
    John

    Physical path on the database server.
    Using the api to upload is easy as long as you provide the content-area id, folder-id, display-name, item-type (PORTAL30.WWSBR_API.ITEM_TYPE_FILE), content-area type id (PORTAL30.WWSBR_API.SHARED_OBJECTS), folder-region-id (whatever it is for Regular Items, you'll find it in wwsbr_all_folder_regions) and the physical file-name.

  • How to delete a list item in Sharepoint 2007 via SOAP?

    I am looking to delete a list item using soap web services. I am using the Lists.asmx web service.
    The XML looks like this:
    <Batch OnError="Continue" ListVersion="1">
    <Method ID="1" Cmd="Delete">
    <Field Name="ID">7</Field>
    </Method>
    </Batch>
    I got this from the msdn docs at http://msdn.microsoft.com/en-us/library/lists.lists.updatelistitems%28v=office.12%29.aspx
    And I am using the Lists.UpdateListItems Method.
    I am doing this in python and python has a library, suds for this purpose. However I get this exception:
    suds.WebFault: Server raised fault: 'Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.'
    I have looked for typos, and verified the XML format. Where am I going wrong?
    Some help please.

    http://linesofcode.net/snippets/166

  • Create List Item using SharePoint 2010 Workflow

    Hello everyone.
    I found in youtube video using SP Employee Onboarding Web Part, idea is quite simple and powerful. But this web part available only in SP 2013, and I use 2010. So I wanted to develop my own version.
    Questions is:
    I have 2 lists Employee OnBoards (list contains data about new employee) and Employee OnBoards Tasks (list contains approval task). Where field Employee Name from Employee OnBoards list is lookup field in Employee OnBoards Tasks list.
    I need emplement next:
    When new Item created in Employee OnBoards list, it should copy Employee Name value to the Name field of the Employee OnBoards Tasks list.
    I hope I explained understandable.
    Thanks.

    Hi Azamat,
    This you can do by using SharePoint Designer workflow.
    Create a sharepoint designer workflow and invoke that when new item will create in the list Employee
    OnBoards.
    then use Copy List item action to copy employee name to employee on board task list.
    Below link will help you how to use copy list item action in a workflow.
    http://blogs.salmanghani.info/copy-item-workflow-using-sharepoint-designer-2010/
    Hope this will help you.
    Regards
    Soni K

  • Remove/hide "new item or edit this list" link of sharepoint online (office 365) with csom

    as title, I delevelop an app for sharepoint online, so I must use client api to operate sharepoint object. now, i need to remove/hide the link “new item or edit this list”, not use js do it, what can i do? help!!

    Hi,
    Per my understanding, you might want to remove the link “new item or edit this list” of a list view web part using Client Object Model.
    As there is no such property in
    WebPart object can be used to hide/remove the link, I suggest you apply custom CSS style to the page which contains the list view
    web part to hide it.
    Best regards
    Patrick Liang
    TechNet Community Support

  • Termstore changes are not getting reflected in the list items in SharePoint 2010 farm environment

    Hi,
    I had created managed metadata with termstores from central admin. Then I had created one list in which added a column of type managed metadata using the managed metadata which I had created. And also added few list items to this list.
    The problem is that after updating a termstore the changes are not reflecting in the list items which were added before the update.
    I have referred the following links:
    http://www.paulgrimley.com/2011/02/managed-metadata-changes-not-applied-to.html
    http://davidfrette.wordpress.com/2010/05/26/taxonomy-update-scheduler%C2%A0timer%C2%A0job/
    According to the links we need to run Taxonomy Update Scheduler on the server for updated termstore to get reflected. After running
    this scheduler on development environment changes are getting reflected but not working on the production environment.
    Kindly help!
    Regards, Shruti

    You should check the obvious.  You made the change in dev, but did you make the change in production too?  And, is the term you updated, actually the one that you are looking at in the list item?
    There is not much, if anything, that can go wrong with that timer job. so I'd guess that the term you are looking at is not the one you think you are updating.
    If you have double checked everything (the term is is in fact the same term id), then you may have something erroring in the update process.  In this case, you should check the ULS logs for any errors.
    Chris
    Chris Givens CEO, Architecting Connected Systems
    Blog Twitter

  • Can we query more than 5000 library items in Sharepoint online library using CSOM?

    I am writing a console application to fetch all documents from the SharePoint Online Site. I am worrying what happens if library items grow beyond 5000 items. In my earlier experience from SP2010, I will raise the threshold limit from Central Admin Site
    and then perform my CAML query operation. In SharePoint Online Site, is this possible ? If not, is there any alternative to get all the documents above 5000 limit ?

    At the moment I wouldn't advise it without using folders.
    You can, definitely, add more than 5k items in Office 365 lists. If you design them well and add indexes before you go over the threshold then it should be fine.
    HOWEVER, once you go over the 5k threshold you lose the ability to change all the items in the list at once. Which means you can't add indexes to columns, can't add new columns, can't remove columns or perform any large admin task.
    Incidentally CAML queries and upping the threshold are either/or options in on-premises installs. CAML is the way forward and can be used without increasing the threshold in the vast majority of cases.
    In terms of support the MS documentation is unhelpful:
    http://office.microsoft.com/en-gb/office365-sharepoint-online-enterprise-help/sharepoint-online-software-boundaries-and-limits-HA102694293.aspx
    There it states that MS only support 5k items in a site list/library.

  • Change document file name via workflow - SharePoint Online

    Is it possible to change the filename of document uploaded in sharepoint online/onpremises using workflow?
    We would like to have documents uploaded to sharepoint but unfortunately some have the same name and this from a folder structure :(
    When i used a workflow and use set i keep getting error.
    Thanks in Advance

    Hi,
    We can create a calculated column and use SharePoint designer workflow to achieve your requirement.
    More information is here:
    http://www.oracular.com/site/index.php/easyblog/workflows-that-rename-files-part-1
    Best Regards
    Dennis Guo
    TechNet Community Support

Maybe you are looking for