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

Similar Messages

  • How to update a list item through Sharepoint Designer Workflow?

    Hi,
    I have a created a list, in which "Completion date" column is there.
    Now I want to update column "Completion Date" through SPD, specifies value(date) after 10 days of created date of a record in list.
    Please help.
    Thanks in advance

    Hi,
    You can use the "Build Dynamic String" action to convert the date field to a string,
    And use string comparison to determine if the date is blank
    For more information, please refer to
    http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!498.entry
    Hope this helps
    Thanks!
    Stanfford

  • Workflow - how to update multiple list items

    Is it possible to update up to 3 list items with the same information using a workflow?  My scenario is where a company vehicle (registration number) has up to three drivers assigned to it - Driver Name 1, Driver Name 2 and Driver Name 3.   I
    have two separate lists - one for vehicles (fleet list) and one for drivers (driver database).  In my workflow when an item is created or changed in the fleet list, I would like the current vehicle registration to be updated in all three driver records
    in the driver database.  I am not sure if I can do this as I am unsure of what my unique look up would be as I need to be able to tie a vehicle registration to a driver name. Any advice would be much appreciated.
    Thanks

    Hi,
    Refer to the following threads about how to update multiple list items simultaneously.
    http://social.technet.microsoft.com/Forums/en-US/936d05ba-6e86-4f44-bbdb-b3c5c12b2c68/how-do-i-update-multiple-list-items-at-once-in-a-sharepoint-list
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/2d342b01-1978-40c9-a203-303d145b331e/how-to-update-mulitple-list-items-at-same-time
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/8d5b7424-58dc-470b-8142-90755dbdeaae/sharepoint-workflow-change-multiple-items-in-other-list
    Thanks.
    Tracy Cai
    TechNet Community Support

  • 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 update 500 list items using Rest API

    Hi All,
    i have requirement that is "required to update 500 list items using rest Api".
    how can i do it,please share your thoughts with me.
    Thanks,
    Madhu.

    Didn't get you correctly, if you asking reference for REST API to update list items please refer below links
    http://msdn.microsoft.com/en-us/library/office/jj164022(v=office.15).aspx
    Destin -MCPD: SharePoint Developer 2010, MCTS:SharePoint 2007 Application Development

  • 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

  • How To? Select List item return 2 values (high and a low)

    Can anyone suggest how to make a select list drop box return 2 values for my query.
    eg:
    Pick from
    Last Week
    Last Month
    Last Year
    return high/lo values of
    5-feb-06 12-feb-06
    01-jan-06 31-jan-06
    01-jan-05 31-dec-06
    Such that my query can refer to it as
    select *
    from tabx
    where dte > :parm_lo
    and dte < :parm_hi
    You get the idea ..

    I haven't tested this at all, so it may not work, but the first thing that springs to mind is not returning the two dates, base it on the current date, i.e. have your select list return something like -
    Last Week - Return 'W'
    Last Month - Return 'M'
    Last Year - Return 'Y'
    then use a query something like -
    SELECT *
      FROM tabx
    WHERE dte >
              CASE v ('ITEM')
                 WHEN 'W'
                    THEN TRUNC (SYSDATE, 'd')
                 WHEN 'M'
                    THEN TRUNC (SYSDATE, 'Mon')
                 WHEN 'Y'
                    THEN TRUNC (SYSDATE, 'yyyy')
                 ELSE dte - 1
              ENDLike I said, completely untested and may not work...you may also have to play around with the boundary values (NLS settings too perhaps).

  • How to highlight selected list item in sap ui5?

    I have a list..in which custom list items have been used.
    On click of any custom list item it should get highlighted,
    I am able to click on each custom item...and have added an browser event
    on its click..which changes its color ..
    function to change its color goes like this:
    hbox.attachBrowserEvent("click", function(event) {
                    var idOfHbox= this.getId();
                     $('#'+idOfHbox).css"backgroundcolor","#e6f2f9");
    ALso for each custom list item I have used a button and a checkbox in a HBox..
    So am changing the hbox color (on click event).
    The problem here is...
    When i select one item, and then select another item..both of them are highlighted..
    I want only the current selected item to be highlighted.
    Please guide..

    Have you tried using the SelectionChange event on the list, rather than the browser onClick event?
    I believe the SelectionChange event is fired for each selected and deselected item in the list.
    https://sapui5.hana.ondemand.com/sdk/docs/api/symbols/sap.m.ListBase.html#event:selectionChange
    Many thanks,
    Jason

  • 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

  • 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

  • Update a list item after a task is completed

    Hi,
    I have a sharepoint workflow, where I am creating a workflow and the workflow steps involves assigning a task. How do I Update a list item after the task is completed? So after the task assignment step, how do I check that the task is completed so I can
    update a list item?
    Please help.
    techie

    Hi,
    According to your description, you might want to update a list item after a task is completed in SharePoint Designer workflow.
    By default, the workflow will stuck at a “Assign a task” action. When the “Task Status” become “Completed”, other actions afterwards will go on.
    Here is a demo about how to update a list item after a task is completed in my environment:
    You can follow the steps above to make a test in your environment to see if this is what you want.
    Thanks                      
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support,
    contact [email protected]
    Patrick Liang
    TechNet Community Support

  • ECMA/CSOM script to update multiple list items

     i am trying update multiple list items using CSOM/ECMA script but it updates only first record. can help out .how to update multiple list item records 
    Note(sharepoint hosted APP) only client side coding solution 
    function updateListItems() {
    var itemArray = [];
    var clientContext = SP.ClientContext.get_current();
    var oList = clientContext.get_web().get_lists().getByTitle('TestList');
    for(var i = 1; i<= 5; i++){
    var oListItem = oList.getItemById(i);
    oListItem.set_item('Title', 'My Updated Item!' + i);
    oListItem.update();
    itemArray[i] = oListItem;
    clientContext.load(itemArray[i]);
    clientContext.executeQueryAsync(onQuerySucceeded, onQueryFailed);
    function onQuerySucceeded() {
    alert('Items Updated');
    function onQueryFailed(sender, args) {
    alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
    updateListItems();

    Have a look at the following link for your reference
    https://social.msdn.microsoft.com/Forums/office/en-US/fc91b7b5-6300-4302-af93-4fc697131ec5/client-object-model-update-multiple-list-items?forum=sharepointdevelopment
    You can modify CAML query to fetch rows that you want to fetch.
    Geetanjali Arora | My blogs |

  • How to update an existing item in a sharepoint list using the WSS adapter for Biztalk

    Is there a way that a record in SP list be updated using WSS adapter in biztalk ?
    BizTalk 2013 and SP 2013 ..
    Regards
    Ritu Raj
    When you see answers and helpful posts,
    please click Vote As Helpful, Propose As Answer, and/or Mark As Answer

    A ListItem has its own unique row id so in all likelihood, an insert with the same data will result in a new list entry. The Lists Web Service however, has an UpdateListItem method which will take an update request. [refer
    http://msdn.microsoft.com/en-us/library/office/websvclists.lists.updatelistitems(v=office.15).aspx ]
    There is another note in the conference (marked answered) to your List Item Update problem. Probably worth a try too. [refer
    http://social.msdn.microsoft.com/Forums/en-US/bee8f6c6-3259-4764-bafa-6689f5fd6ec9/how-to-update-an-existing-item-in-a-sharepoint-list-using-the-wss-adapter-for-biztalk?forum=biztalkgeneral ]
    Regards.

  • Update existing list item value in sharepoint using web service code

    I have the below code which I am trying to run for updating the list item value. "Settings" is the list name and the item in this list is having index of 1.
    Main()
            ListsSoapClient client = new ListsSoapClient();           
            client.ClientCredentials.Windows.ClientCredential = System.Net.CredentialCache.DefaultNetworkCredentials;
            client.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;
            string strListName = "Settings";          
            client.Open();          
            XElement listData = client.GetList(strListName);  
            string listID = listData.Attribute("ID").Value;
            string version = listData.Attribute("Version").Value;
            // string version = listData.Attribute("View").Value; Doesnt work
            // Method 1 : Make the call to SharePoint
            var listItems = client.GetListItems(strListName, null, null, null, null, null, null);
            List<XElement> results = listItems.Descendants().ToList();
            XElement updateItem = results[1];
            updateItem.SetAttributeValue("ows_Value", "value to update");
            client.UpdateListItems(strListName, updateItem); //Didnt work
            // Method 2 : Make the call to SharePoint
            string strBatch = "<Method ID='1' Cmd='Update'>" +
                            "<Field Name='ID'>1</Field>" +
                            "<Field Name='Title'>" + "999" + "</Field></Method>";
            XmlDocument xmlDoc = new System.Xml.XmlDocument();
            System.Xml.XmlElement elBatch = xmlDoc.CreateElement("Batch");
            //elBatch.SetAttribute("OnError","Continue"); //Not mandatory ?
            //elBatch.SetAttribute("ListVersion","1"); //Not mandatory ?
            //elBatch.SetAttribute("ViewName", "00F85842-35AD-4AED-8DF7-0F903FB850BE"); is it mandatory ?
            elBatch.InnerXml = strBatch;
            client.UpdateListItems(strListName, XmlElementToXelement(elBatch)); //doesnt work
            client.Close();
       public static XElement XmlElementToXelement(XmlElement e)
            return XElement.Parse(e.OuterXml);
    How do we get the ViewName value of the list using code ? why is it not mandatory in Method 2. At the end of the method1 i am getting the below exception.How do I fix this ?
     Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.

    you can get view name using below links:
    http://stackoverflow.com/questions/14857811/sharepoint-web-services-getlistitems-view-name
    http://www.a2zmenu.com/Blogs/SharePoint/Get-selected-view-name-of-a-SharePoint-List.aspx
    you can use SPList.getview method.

  • Update item in SharePoint 2010 list when a entry made in SQL server

    Hi there,
    I have four lists on a SharePoint 2010 site. There is a column - Equipment Name - in each of the lists. I want only this column to be updated in all the lists, when a new entry is made in SQL server.
    I referred
    http://oszakiewski.net/eric/connecting-a-sharepoint-2010-list-to-external-database-table and found it good, however I want to only update one column and not to perform CRUD. Also, can it be possible to achieve this without referring to Central Administration
    settings?
    Thanks

    Hi,
    Let’s verify the following:
    Whether your four lists are external list with SQL Server data source. If not, you can’t sync the list with SQL Server.
    External list items are sync from data source, they keep sync all the time.
    Whether you aren’t want to perform CRUD in the list. You can select some of them instead of using all of them.
    You can create all of the column from the four lists in your SQL Server database table, and then create four external lists with that table as data source.
    Modify view-> in each external list check the columns which you want display in every list. Then you can update the “Equipment” column in each external list.
    Best Regards,
    Lisa Chen
    Lisa Chen
    TechNet Community Support

Maybe you are looking for

  • Oracle Hyperion EPM 11.1.2 Installation on Linux Server Issue

    Hi All, We were downloaded and extracted all zip files (placed in opt/hyperion) from edelivery.oracle.com on LINUX 64 - Server.Before start the installation created new user and assigned to particular group.We are unable to point out the new location

  • Inbund Delivery Date Purchase order delivery date

    Where in customizing can I make it standard that the inbound delivery takes over the delivery date from the purchase order, and not the creation date?

  • Large DataTable causes out of memory exception

    Hello Support  We have a datatable that returns 112970 records and have 51 columns. When we try generate an xls file or display data result in grid view than "System Out of memory exception" is thrown. OS : Windows 2003 Enterprise 32 Bit HP DL380 G4

  • Hyperlink not responding to Skin

    I've created the following Hyperlink, yet when I render it the skin has no effect on it's appearance. it still is just a small 11pt black font, rather than the 35 pt white text. Am I doing something wrong? Hyperlink{           text: "Test";     skin:

  • Aperture to [Original images | Lightroom]?

    Just manged to delete the long version of this post so I'll keep it short: - Aperture doesn't support my cameras RAW files. - I have a copy of all my images in the filesystem external to Aperture's database. (my trust of db's not getting corrupt is l