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

Similar Messages

  • 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 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

  • 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

  • How to Update multiple line Items in Sales order Interactive form

    Hi,
            I have created one online interactive form for sales order. In that I incorporated dynamic table logic .i.e. we can add row and delete row using buttons. Interactive form is working fine with one line item. But if I give multiple lines in table (line item) its creating sales order with single line item. So please help me how to pass multiple lines.
    Thanks & Regards,
    Krishna.

    Hi,
    Check out this link, this deals with the problem you are facing.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/802f0ed1-a17a-2c10-7db4-d515a5b047ed
    Regards,
    Runal

  • How to populate multiple list items dynamically?

    Dear members,
    I have a form there are 3 list items i want to populate these from a record group by dynamically.
    but i can be able to populate only one list item. the others give errors.
    frm-41337 cannot populate the list from record group.
    following is the program unit:
    PROCEDURE POPULATE_LIST_WITH_QUERY
         (p_list_item in varchar2,
         p_query in varchar2)
    IS
         cst_rg_name constant varchar2(30) :=
              GET_ITEM_PROPERTY(p_list_item,item_name);
         v_rg_id RECORDGROUP;
    BEGIN
         v_rg_id := FIND_GROUP(cst_rg_name);
         if id_null(v_rg_id) then
              v_rg_id := create_group_from_query(cst_rg_name, p_query);
         end if;
         if populate_group(v_rg_id) =0 then
              populate_list(p_list_item, v_rg_id);
              copy(get_list_element_value(p_list_item,1),p_list_item);
         end if;
    END;
    i call this in the when-create-record
    populate_list_with_query('gl_users.location_id',
    'select location_name, to_char(location_id) from gl_locations');
    populate_list_with_query('gl_users.company_id',
    'select company_name, to_char(company_id) from gl_company');
    populate_list_with_query('gl_users.group_id',
    'select group_name, to_char(group_id) from gl_user_groups');
    only one is populated others give errors.
    what is wrong?
    thanks
    Muhammad Nadeem
    Oracle Programmer
    CHIMERA
    Lahore
    0092-0301-8334434

    Hi again,
    Did the popup work ?
    For the list item , use the built-in add_list_element in a loop. Example : in the pre-form or when-new-form-instance trigger ,
    clear_list('block_name.list_item_name');
    for rec in (select column1,column2 from t_table order by 1 desc) loop
    ADD_LIST_ELEMENT('block_name.list_item_name', 1, rec.column1, rec.column2);
    end loop;
    See you

  • 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

  • How to insert multiple list item as separate records

    I have a form with a list field in which user can select
    multiple item <select multiple="multiple"><option
    value></option></select>. My problem is that I don't
    know how to do an insert sql operation that puts every selected
    item on the list field into a separate record in a database table.
    I think that first I should get it to know how many item was
    selected from the list, than write the insert into statement
    between loop tags which loops the operation until every item has
    inserted. I'm not sure about it and even if I'm right, I don't know
    how to code it. Could someone show me a sample code for such a
    "problem"?

    quote:
    Originally posted by:
    Newsgroup User
    The ScareCrow wrote:
    uh, depending on the db (say it's sql server) you might want
    to swap the loop &
    cfquery to make that one big insert rather than a bunch of
    cfqueries.
    The following approach will work with just about any db and
    only uses once connection
    <cfquery>
    insert into sometable
    (field1, field2, etc)
    <cfloop list = "#somelist#" item = "thisitem">
    select distinct #thisitem#, 'something else', etc
    from some_small_table
    <cfif listfind(somelist, thisitem) lt
    listlen(somelist)>
    union
    </cfif>
    </cfloop>
    </cfquery>

  • 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

  • How to Update multiple items in other list using event handler?

    Hi All,
    If i update a item in a list, then i should update multiple items in another list need to be update. How to achive using event receivers?

    Hi Sam,
    According to your description, my understanding is that you want to update multiple items in another list when updated a list item.
    In the event receiver, you can update the multiple item using Client Object Model.
    Here is a code snippet for your reference:
    public override void ItemUpdated(SPItemEventProperties properties)
    string siteUrl = "http://sp2013sps/sites/test/";
    ClientContext clientContext = new ClientContext(siteUrl);
    List oList = clientContext.Web.Lists.GetByTitle("another list name");
    ListItem oListItem = oList.GetItemById(1);
    oListItem["Title"] = "Hello World Updated!";
    oListItem.Update();
    clientContext.ExecuteQuery();
    Best regards,<o:p></o:p>
    Zhengyu Guo
    Zhengyu Guo
    TechNet Community Support

  • Send one mail for multiple list item update

    i have 3 lists storing customer details which are displayed in a page. i need to send mail whenever there is customer details update(any or all 3 lists). should send only one mail per customer details update(not per list item update).Please advise how to
    achieve this using SharePoint workflow.

    Hi,
    According to your post, my understanding is that you want to send an email when this are list items update.
    A workaround is that we can use one big list to store the customer details from these three lists, then let users update their information in the big list and send email.
    Or we can create a form to update these 3 lists, then send a mail when the form saved.
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/39f2d0bf-6cfd-4b61-b0b7-ff89113406d5/update-multiple-list-from-a-single-form-using-infopath-in-sharepoint-2010?forum=sharepointcustomizationprevious
    Best Regards
    Dennis Guo
    TechNet Community Support

  • How do I change multiple list items at once in a SharePoint list with ribbon button

    Hi
    I have a sharepoint list and a ribbon button that open a dialog box with buttons to set color on a row
    The problem is that i can only selecet one item at once to set the color. 
    How can i do so it could set all or a couple items att once to the color i want 
    I want to do this with javascript
    here is the code i use to get the item id and the color code is in a seperate js file
    'use strict';
    var clientContext, hostweburl, parentContext, parentWeb, selectedItem, itemId, listId;
    clientContext = new SP.ClientContext.get_current();
    hostweburl = decodeURIComponent(getQueryStringParameter("SPHostUrl"));
    listId = decodeURIComponent(getQueryStringParameter("SPListId"));
    itemId = decodeURIComponent(getQueryStringParameter("SPListItemId"));
    parentContext = new SP.AppContextSite(clientContext, hostweburl);
    parentWeb = parentContext.get_web();
    selectedItem = parentWeb.get_lists().getById(listId).getItemById(itemId);
    $(document).ready(function () {
    clientContext.load(selectedItem);
    clientContext.executeQueryAsync(OnSuccess, OnFail);
    function OnSuccess() {
    $("#Blue").click(function () {
    selectedItem.set_item('Color', 'Blue');
    selectedItem.update();
    clientContext.load(selectedItem);
    clientContext.executeQueryAsync(function () { window.parent.postMessage('CloseCustomActionDialogRefresh', '*'); }, function (sender, args) { alert('Error:' + args.get_message()); });
    $("#Green").click(function () {
    selectedItem.set_item('Color', 'Green');
    selectedItem.update();
    clientContext.load(selectedItem);
    clientContext.executeQueryAsync(function () { window.parent.postMessage('CloseCustomActionDialogRefresh', '*'); }, function (sender, args) { alert('Error:' + args.get_message()); });
    $("#Red").click(function () {
    selectedItem.set_item('Color', 'Red');
    selectedItem.update();
    clientContext.load(selectedItem);
    clientContext.executeQueryAsync(function () { window.parent.postMessage('CloseCustomActionDialogRefresh', '*'); }, function (sender, args) { alert('Error:' + args.get_message()); });
    $("#Transparent").click(function () {
    selectedItem.set_item('Color', 'No Color');
    selectedItem.update();
    clientContext.load(selectedItem);
    clientContext.executeQueryAsync(function () { window.parent.postMessage('CloseCustomActionDialogRefresh', '*'); }, function (sender, args) { alert('Error:' + args.get_message()); });

    Check if below can help you
    http://sp2010batchedit.codeplex.com/
    http://sharepoint.stackexchange.com/questions/35935/use-view-ribbon-custom-action-on-multiple-list-items
    http://webcache.googleusercontent.com/search?q=cache:XqMO-PRLHQIJ:dannyjessee.com/blog/index.php/2014/06/enabling-custom-ribbon-buttons-dynamically-based-on-multiple-selected-item-values-using-refreshcommandui-and-jsom/+&cd=1&hl=en&ct=clnk&gl=in
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <CustomAction Id="DannyJessee.TestCustomAction"
    Location="CommandUI.Ribbon"
    RegistrationId="100"
    RegistrationType="List">
    <CommandUIExtension>
    <CommandUIDefinitions>
    <CommandUIDefinition
    Location="Ribbon.ListItem.Actions.Controls._children">
    <Button Id="DannyJessee.MarkItemsFinishedButton"
    Command="cmdMarkItemsFinished"
    Image16by16="/_layouts/images/kpinormallarge-0.gif"
    Image32by32="/_layouts/images/kpinormallarge-0.gif"
    LabelText="Mark as Finished"
    TemplateAlias="o2" />
    </CommandUIDefinition>
    </CommandUIDefinitions>
    <CommandUIHandlers>
    <CommandUIHandler Command="cmdMarkItemsFinished"
    CommandAction="javascript:MarkItemsFinished();"
    EnabledScript="javascript:EnableFinishedButton();">
    </CommandUIHandler>
    </CommandUIHandlers>
    </CommandUIExtension>
    </CustomAction>
    <CustomAction Id="DannyJessee.TestScript"
    Location="ScriptLink"
    ScriptSrc="/_layouts/15/CustomRibbonButton/CustomAction.js" />
    </Elements>
    If this helped you resolve your issue, please mark it Answered

  • 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.

  • Invalid data has been used to update the list item. The field you are trying to update may be read only.

    Trying to follow Serge Luca's Step by Step Tutorial. Creating Workflows for Windows Sharepoint Services and MOSS2007.  http://sergeluca.spaces.live.com/blog/cns!E8A06D5F2F585013!859.entry
    I have an onWorkflowActivated, followed by an ifElse condition and a log to history.
    In the IfElse, each branch has a code segment, that trys to update the status column in the list that the workflow is attached to.
    private void Authorize_ExecuteCode(object sender, EventArgs e)
    // tried serveral methods
    WorkflowProperties.Item["Status"] = "Automatically Approved";
    // tried all of the following (one at a time)
    item.update();
    WorkflowProperties.Item.Update();
    WorkflowProperties.Item.SystemUpdate();
    //tried this as well.
    Microsoft.SharePoint.SPListItem item = WorkflowProperties.Item;
    item["Status"] = "Automatically Approved";
    item.Update() ;
    On the update call I keep getting "Invalid data has been used to update the list item. The field you are trying to update may be read only."
    Could someone explain how to update "Status" column of the list item that the workflow is working on?
    Thank you very much.
    Bill
     

    Hi:
    you can do the following:
    add the following code to the workflow.xml file (under the MetaData section)
    Code Snippet
    <ExtendedStatusColumnValues>
    <StatusColumnValue>Branch1</StatusColumnValue>
    <StatusColumnValue>Branch2</StatusColumnValue>
    </ExtendedStatusColumnValues>
    then add 2 SetState activities one in each branch of the IfElse.
    for the code behind of setState1 (branch1) write the following code:
    Code Snippet
    state = Convert.ToInt32(SPWorkflowStatus.Max);
    for setState2 (branch2) write the following:
    Code Snippet
    state = Convert.ToInt32(SPWorkflowStatus.Max) + 1;
    where state is the variable assigned to the field State in the properties of the SetState(design lever), or instead of state u can use the following code:
    Code Snippet
    ((SetState)sender).State
    where sender is the object sent through the function parameter.
    hope this answered your question
    Best Regards

  • Need to update the list item in the same sharepoint list with particular condition with Sharepoint Designer 2013.

    Hi All
    I have one sharepoint list with huge data i.e with 20columns and more than 200 records with the fields .
    Suppose lets consider there are A,B,C,D,E,F,G,H columns.
    Now i want to create one form with the fields A,C,E.
    When the user enter the existing data of list for columns A,C..based on C value the E column value should change and update that particular item in the list.
    Please guide me without visual web part can we acheive this by Sharepoint designer 2013 or what would be the preferable solution.
    Please help me on this as it is very urgent from me..
    Thanks in Advance
    Sowjanya G

    Hi,
    According to your post, my understanding is that you wanted to update the list item in the same sharepoint list with particular condition with Sharepoint Designer 2013.
    I recommend to create workflow associated to the list and then start the workflow automatically when an item is changed.
    In the workflow, you can add condition and actions as below:
    If current item: C equal to Test1
         Set E to Test2
    Then the value of the filed E will be changed based on the value of the filed C.
    In addition, if you create the form using InfoPath, you can add rule to the filed C as below:
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

Maybe you are looking for

  • Acrobat won't install updates

    I have installed Adobe creative suite 3 and adobe acrobat 9 standard. Every time acrobat starts it tells me updates are available do you wish to install. I say yes and it tells me that it must shut down acrobat to do this. Do you want to continue or

  • Holidays in Planning books

    Hi, In our Demand Planning scenario, our horizon is for one month with daily buckets. Sales person gives demand on daily basis. Grateful, if somebody suggest me on how to make planning book columns display only for holidays (sales person will not be

  • Closing HTTP Sessions

    Hello I'm looking for a way to close open HTTP Sessions on the J2EE. I know how to close the session in the WebApplication and I know how to modify the session timeout but that's not what I'm looking for. I need to be able a selected session on the J

  • IPad to iTunes

    I reformatted my PC without backing up my iTunes contents...now I want to transfer the contents of my iPad to my newly installed iTunes but I guess it will delete all the contents when it synch..how will I transfer my iPad apps to iTunes...?

  • E72 - How well does it work with Garmin Mobile XT?

    I bought Garmin Mobile XT for my mobile and successfully installed it, but it stops responding after a while, maybe some 5-10 minutes. Has anyone else tried it with the E72? "The 9000 series is the most reliable computer ever made." HAL 9000 Solved!