SP Designer - Update list item value error

Hi,
I'm making holiday requests with SP designer, and my workflow works well, however, when the manager validation task is created, I would like to add the holiday request's details (such as start date, end date, Employee ID, etc).
So I have a list called "Holiday request" and an associated task list where all the validation tasks are stored.
What I tried was to use the "Update list item" function to update the Employee ID value (in the validation task column I created) with the holiday request's Employee ID value. So what I did was this :
(I initially posted a picture but I cannot, apparently)
The list I work on is the associated task list. I chose the field "Employee ID" and set the value to "Current item : Employee ID".
In my lookup, I've set the associated content field and in the value : "Current Item:Title"
I have also tried to use the Current Item:ID (which would be the Holiday request's ID), but it didn't work either. I've been testing a lot and wanted to know if you guys had any suggestions ?
Thanks a lot.
Cheers

Below are steps need to performed to update custom fileds in task form
1. Create custom task content type using SharePoint 2013 workflow task.
2. Add your fields here (start date, end date, Employee ID etc).
3. Make sure this custom task content type is associated with workflow task list.
4. In the assign task activity change the Task content type to your custom task content type.
5.From the single task activity properties uncheck "Wait for Task completion".
The below screenshot i have updated Empid in task form with current list Item id. You can update them according to your requirement.
Hope this helps.
My Blog- http://www.sharepoint-journey.com|
If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

Similar Messages

  • Use "Update List Item" to add multiple Values

    I'm having a List on a SharePoint 2013 Farm.
    Each Entry can be a Member of a different Entry, and also can have multiple members.
    Now i want to Update my List Items with Orchestrator IP "Update List Item" and want to add this members to my List Element. If  i try it with one member, all is fine, but i want to add multiple Members to a List Entry
    i tried to seperate with commas, semicolon, spaces, line breaks.....
    For Example:
    My list Element will repesent my Business Services like Microsoft Exchange, Microsoft Exchange Mailbox, Client, Server......
    No i want to add to the List Entry "Microsoft Exchange" the members "Exchange Mailbox" and "Client"
    Any Ideas?
    Seidl Michael | http://www.techguy.at |
    twitter.com/techguyat | facebook.com/techguyat

    Hi
    what i want to do is this
    when i configure my Activity to update twice, so one Activity vor "PowerClient" and one Activity for "A000001" only the last Entry exist, so it will overright the existing Entry.
    i am not sure how to configure the Activity to add multiple Values at once.
    Seidl Michael | http://www.techguy.at |
    twitter.com/techguyat | facebook.com/techguyat

  • Collect data from User workflow error updating list item

    Hi, can someone please help me with WSS 3 workflows?!
    I'll keep it simple - I have a workflow step "Collect data from user" that will fail with Unknown Error when attempting to update list item (this is after the user has clicked Complete Task). The workflow does not continue past this step and I have
    to terminate the workflow.
    What is odd, is that if I do another Collect data from User in the same step but following the 1st collect, both will work!! How can this be?? This proves the 1st collect is OK so why won't it run without another Collect data after it?! Doesn't make sense to
    me.
    I was just trying the second Collect to troubleshoot the issue. I've tried other actions there but having another Collect does seem to be the action that kicks things into life. Is there a clue here?
    Any clues would be much appreciated as I'm not able to turn much up when I Google.
    Thanks

    Well, surprise, surprise, this has come back (thought it might!). The trace logs show it's a task locked error but I can't see how. Can anyone please provide me with some clues??
    03/14/2014 12:30:25.11     w3wp.exe (0x7698)                           0x5EA4    Windows SharePoint
    Services       Web Controls                      88wy    Medium      SPDataSourceView.ExecuteSelect()
    - selectArguments: IsEmpty=True, MaximumRows=0, RetrieveTotalRowCount=False, SortExpression=, StartRowIndex=0, TotalRowCount=-1    
    03/14/2014 12:30:28.39     w3wp.exe (0x7698)                           0x6C4C    Windows SharePoint Services 
         Web Controls                      88wy    Medium      SPDataSourceView.ExecuteSelect() - selectArguments:
    IsEmpty=True, MaximumRows=0, RetrieveTotalRowCount=False, SortExpression=, StartRowIndex=0, TotalRowCount=-1    
    03/14/2014 12:30:28.47     w3wp.exe (0x7698)                           0x6C4C    Windows SharePoint Services 
         Web Controls                      88wy    Medium      SPDataSourceView.ExecuteSelect() - selectArguments:
    IsEmpty=True, MaximumRows=0, RetrieveTotalRowCount=False, SortExpression=, StartRowIndex=0, TotalRowCount=-1    
    03/14/2014 12:30:29.86     w3wp.exe (0x7698)                           0x7A94    Windows SharePoint Services 
         Workflow Infrastructure           72er    Medium      Microsoft.SharePoint.SPException: This task is currently locked by a running workflow and cannot
    be edited.     at Microsoft.SharePoint.SPListItem.PrepareItemForUpdate(Guid newGuidOnAdd, SPWeb web, Boolean bMigration, Boolean& bAdd, Boolean& bPublish, Object& objAttachmentNames, Object& objAttachmentContents, Int32&
    parentFolderId)     at Microsoft.SharePoint.SPListItem.UpdateInternal(Boolean bSystem, Boolean bPreserveItemVersion, Guid newGuidOnAdd, Boolean bMigration, Boolean bPublish, Boolean bNoVersion, Boolean bCheckOut, Boolean bCheckin, Boolean
    suppressAfterEvents)     at Microsoft.SharePoint.SPListItem.Update()     at Microsoft.SharePoint.Workflow.SPWinOEWSSService.CommitUpdateListItem(Transaction txn, Object[] transData)    
    03/14/2014 12:30:29.86     w3wp.exe (0x7698)                           0x7A94    Windows SharePoint Services 
         Workflow Infrastructure           72fe    High        Error in commiting pending workflow batch items: Microsoft.SharePoint.SPException: This
    task is currently locked by a running workflow and cannot be edited.     at Microsoft.SharePoint.SPListItem.PrepareItemForUpdate(Guid newGuidOnAdd, SPWeb web, Boolean bMigration, Boolean& bAdd, Boolean& bPublish, Object& objAttachmentNames,
    Object& objAttachmentContents, Int32& parentFolderId)     at Microsoft.SharePoint.SPListItem.UpdateInternal(Boolean bSystem, Boolean bPreserveItemVersion, Guid newGuidOnAdd, Boolean bMigration, Boolean bPublish, Boolean bNoVersion,
    Boolean bCheckOut, Boolean bCheckin, Boolean suppressAfterEvents)     at Microsoft.SharePoint.SPListItem.Update()     at Microsoft.SharePoint.Workflow.SPWinOEWSSService.CommitUpdateListItem(Transaction txn, Object[]
    transData)     at Micro...    
    03/14/2014 12:30:29.86*    w3wp.exe (0x7698)                           0x7A94    Windows SharePoint Services 
         Workflow Infrastructure           72fe    High        ...soft.SharePoint.Workflow.SPPendingWork.PerformWorkNow(Transaction txn)    
    at Microsoft.SharePoint.Workflow.SPPendingWorkBatch.Commit(Transaction transaction, ICollection items)    
    03/14/2014 12:30:30.05     w3wp.exe (0x7698)                           0x7A94    Windows SharePoint Services 
         Workflow Infrastructure           88xr    Unexpected    WinWF Internal Error, terminating workflow Id# 2dc6002d-9f9d-474f-84cf-329025347ec5    
    03/14/2014 12:30:30.05     w3wp.exe (0x7698)                           0x7A94    Windows SharePoint Services 
         Workflow Infrastructure           98d4    Unexpected    System.Workflow.Runtime.Hosting.PersistenceException: This task is currently locked by a running workflow
    and cannot be edited. ---> Microsoft.SharePoint.SPException: This task is currently locked by a running workflow and cannot be edited.     at Microsoft.SharePoint.SPListItem.PrepareItemForUpdate(Guid newGuidOnAdd, SPWeb web, Boolean
    bMigration, Boolean& bAdd, Boolean& bPublish, Object& objAttachmentNames, Object& objAttachmentContents, Int32& parentFolderId)     at Microsoft.SharePoint.SPListItem.UpdateInternal(Boolean bSystem, Boolean bPreserveItemVersion,
    Guid newGuidOnAdd, Boolean bMigration, Boolean bPublish, Boolean bNoVersion, Boolean bCheckOut, Boolean bCheckin, Boolean suppressAfterEvents)     at Microsoft.SharePoint.SPListItem.Update()     at Microsoft.SharePoint.Workflow.SPWi...  
    03/14/2014 12:30:30.05*    w3wp.exe (0x7698)                           0x7A94    Windows SharePoint Services 
         Workflow Infrastructure           98d4    Unexpected    ...nOEWSSService.CommitUpdateListItem(Transaction txn, Object[] transData)     at
    Microsoft.SharePoint.Workflow.SPPendingWork.PerformWorkNow(Transaction txn)     at Microsoft.SharePoint.Workflow.SPPendingWorkBatch.Commit(Transaction transaction, ICollection items)     at System.Workflow.Runtime.WorkBatch.PendingWorkCollection.Commit(Transaction
    transaction)     at System.Workflow.Runtime.WorkBatch.Commit(Transaction transaction)     at System.Workflow.Runtime.Hosting.WorkflowCommitWorkBatchService.CommitWorkBatch(CommitWorkBatchCallback commitWorkBatchCallback)    
    at System.Workflow.Runtime.Hosting.DefaultWorkflowCommitWorkBatchService.CommitWorkBatch(CommitWorkBatchCallback commitWorkBatchCallback)     at System.Workflow.Runtime.WorkflowExecutor.CommitTransaction(Activity activityContext) 
    03/14/2014 12:30:30.05*    w3wp.exe (0x7698)                           0x7A94    Windows SharePoint Services 
         Workflow Infrastructure           98d4    Unexpected    ...   at System.Workflow.Runtime.WorkflowExecutor.Persist(Activity dynamicActivity, Boolean
    unlock, Boolean needsCompensation)     --- End of inner exception stack trace ---     at System.Workflow.Runtime.WorkflowExecutor.Persist(Activity dynamicActivity, Boolean unlock, Boolean needsCompensation)    
    at System.Workflow.Runtime.WorkflowExecutor.System.Workflow.ComponentModel.IWorkflowCoreRuntime.PersistInstanceState(Activity activity)     at System.Workflow.ComponentModel.Activity.MarkClosed()     at System.Workflow.ComponentModel.Activity.ReleaseLockOnStatusChange(IActivityEventListener`1
    eventListener)     at System.Workflow.ComponentModel.FaultAndCancellationHandlingFilter.SafeReleaseLockOnStatusChange(ActivityExecutionContext context)     at System.Workflow.ComponentModel.FaultAndCancella...  
    03/14/2014 12:30:30.05*    w3wp.exe (0x7698)                           0x7A94    Windows SharePoint Services 
         Workflow Infrastructure           98d4    Unexpected    ...tionHandlingFilter.OnEvent(Object sender, ActivityExecutionStatusChangedEventArgs e)    
    at System.Workflow.ComponentModel.ActivityExecutorDelegateInfo`1.ActivityExecutorDelegateOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)     at System.Workflow.Runtime.Scheduler.Run()    
    03/14/2014 12:30:30.38     w3wp.exe (0x7698)                           0x6C9C    Windows SharePoint Services 
         General                           0    Unexpected    ERROR: request not found
    in the TrackedRequests. We might be creating and closing webs on different threads. ThreadId = 59, Free call stack =    at Microsoft.SharePoint.SPRequestManager.Release(SPRequest request)     at Microsoft.SharePoint.SPWeb.Invalidate()    
    at Microsoft.SharePoint.SPWeb.Close()     at Microsoft.SharePoint.SPSite.Close()     at Microsoft.SharePoint.SPSite.Dispose()     at Microsoft.SharePoint.Workflow.SPWorkflowManager.RunWorkflow(SPWorkflow
    workflow, Collection`1 events, SPRunWorkflowOptions runOptions)     at Microsoft.SharePoint.Workflow.SPWorkflowManager.RunWorkflow(SPWorkflow workflow, Collection`1 events)     at Microsoft.SharePoint.Workflow.SPWinOEItemEventReceiver.RouteWorkflowEvent(SPItemEventProperties
    properties, SPWeb web, SPListItem item, Boolean fNeedTas...    
    03/14/2014 12:30:30.38*    w3wp.exe (0x7698)                           0x6C9C    Windows SharePoint Services 
         General                           0    Unexpected    ...kReset)    
    at Microsoft.SharePoint.Workflow.SPWinOEItemEventReceiver.ItemUpdated(SPItemEventProperties properties)     at Microsoft.SharePoint.SPEventManager.RunItemEventReceiver(SPItemEventReceiver receiver, SPItemEventProperties properties, SPEventContext
    context, String receiverData)     at Microsoft.SharePoint.SPEventManager.RunItemEventReceiverHelper(Object receiver, Object properties, SPEventContext context, String receiverData)     at Microsoft.SharePoint.SPEventManager.<>c__DisplayClass8`1.<InvokeEventReceivers>b__0()    
    at Microsoft.SharePoint.SPSecurity.CodeToRunElevatedWrapper(Object state)     at Microsoft.SharePoint.SPSecurity.RunAsUser(SPUserToken userToken, Boolean bResetContext, WaitCallback code, Object param)     at Microsoft.SharePoint.SPSecurity.RunAsUser(SPUserToken
    03/14/2014 12:30:30.38*    w3wp.exe (0x7698)                           0x6C9C    Windows SharePoint Services 
         General                           0    Unexpected    ...userToken, CodeToRunElevated
    code)     at Microsoft.SharePoint.SPEventManager.InvokeEventReceivers[ReceiverType](SPUserToken userToken, RunEventReceiver runEventReceiver, Object receivers, Object properties, Boolean checkCancel)     at Microsoft.SharePoint.SPEventManager.InvokeEventReceivers[ReceiverType](Byte[]
    userTokenBytes, RunEventReceiver runEventReceiver, Object receivers, Object properties, Boolean checkCancel)     at Microsoft.SharePoint.SPEventManager.HandleEventCallback[ReceiverType,PropertiesType](Object callbackData)    
    at Microsoft.SharePoint.Utilities.SPThreadPool.WaitCallbackWrapper(Object state)     at System.Threading.ExecutionContext.runTryCode(Object userData)     at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode
    code, CleanupCo...    
    03/14/2014 12:30:30.38*    w3wp.exe (0x7698)                           0x6C9C    Windows SharePoint Services 
         General                           0    Unexpected    ...de backoutCode, Object
    userData)     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)     at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback
    tpWaitCallBack)     at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)  , Allocation call stack (if present) null    

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

  • Is it possible to query an Item with two or more conditions in OOB Update List Item WF Step

    In SharePoint Designer 2010, in Workflows, is it possible to give more then one condition when querying items? Let me explain, it is fairly easy to drop Update item in this list step, and say, for example, Update item with ID X. However, if is it possible
    to do something along this lines with OOB steps, Update an item in this list where Title is Equal to "abc" and Modify date no older then 3 days.
    Update: Workflow is started when the item is added to the list. What I would like is to update some fields on this item depending on information in this item and in external list. For example
    Current Item Field 1 has value "abc"
    Current Item Field 2 has value "123"
    Current Item Field 3 has value "456"
    External List has Item with value in Field 1 "123"
    External List has Item with value in Field 2 "abc"
    External List has Item with value in Field 3 "xyz"
    Update Current Item Field 3 with value "xyz"
    In short I would need following query - Update Current_Item_Field_3 with value from External_List_Field_3 where Field 1 is equal to Current_Item_Field_2 and Field 2 is equal to Current_Item_Field_1

    Hi,
    From your description, I understand you want to update list item with workflow based on two or more conditions.
    To resolve your issue, you need to use “If current item field equals value” condition. Use this condition to compare a field in the current item that the list or reusable list workflow is currently running on to a value. Values can be static text, dynamic
    strings, and lookups to variables, context information, or other SharePoint fields. And you can learn more about each condition by referring to the article:
    https://support.office.com/en-in/article/Workflow-conditions-in-SharePoint-Designer-2010-A-quick-reference-guide-d8e33ac7-9336-487f-a60b-388c4ea497ff?ui=en-US&rs=en-IN&ad=IN
    I assume your External List is called “ListB”, and Current List is called “ListA”, You can follow the steps below:
    1. Add “If current item field equals value" for condition that ListB Field2 equals to ListA Field1, then set the second condition “ListB Field1 equal to ListA Field2” as the “Find the List Item” in the “Lookup for Single line of text”
    as the screenshot below:
    2. Add “Update List Item” as the screenshot below for updating Current_Item_Field_3 with value from External_List_Field_3. In addition, you should set “Find the List Item” in “Lookup for Single line of text” same to the “Find the List Item” in step 1:
    In addition, if you have more conditions, you could add “If current item field equals value” condition, and you should set each “Find the List Item” in “Lookup for Single line of text” same to the “Find the List Item” in step 1.
    Regards,
    Rebecca Tu
    TechNet Community Support

  • How to update list item metadata?

    I want to implement lists.asmx > UpdateListItems method. In the update method (the caml) i would like to use barcode as a filter instead of item ID. http://msdn.microsoft.com/en-us/library/office/ms440289(v=office.14).aspx 
    How would my caml look like?
    <Batch OnError="Continue" ViewName="CA28BFCC-4CCE-4EF8-B08F-7824535E13FC">
    <Method ID="1" Cmd="Update">
          <Field Name='BarCode'>6061114511</Field>
          <Field Name="Title">New Title 2</Field>
    </Method>
    </Batch>

    Hi  ,
    You cannot use barcode as a filter instead of item ID by using OOTB  list.asmx. You could build your own custom web service that uses the either the SPQuery class or linq and gather the items based on
    a particular field value.
    For more information, please take a look at the thread:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/af23f9f0-2640-474c-9616-522fcb639029/listserviceupdatelistitems-update-reference-field?forum=sharepointdevelopmentlegacy
    I recommend that you  update list items with listdata.svc.
    Reference:
    http://chuvash.eu/2011/12/15/update-list-items-with-listdata-svc/
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Update List Items using REST API - Keep Getting 400 Bad Request

    I am using code from the following answer:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/40833576-5853-4ca4-95cf-b5b1d69f465f/sharepoint-rest-and-c-sample-to-update-list-item?forum=sharepointdevelopment
    I am having a tough time figuring out the issue though.  I have been able to retrieve list items, but now I want to update those items.  This is the following code just to get the digest information with passing in credentials:
    public static string GetFormDigest(System.Net.NetworkCredential cred)
    string formDigest = null;
    string resourceUrl = "https://SITEURL/_api/contextinfo";
    HttpWebRequest wreq = HttpWebRequest.Create(resourceUrl) as HttpWebRequest;
    wreq.Credentials = cred;
    wreq.Method = "POST";
    wreq.Accept = "application/json;odata=verbose";
    wreq.ContentLength = 0;
    wreq.ContentType = "application/json";
    string result;
    WebResponse wresp = wreq.GetResponse();
    using (StreamReader sr = new StreamReader(wresp.GetResponseStream()))
    result = sr.ReadToEnd();
    var jss = new JavaScriptSerializer();
    var val = jss.Deserialize<Dictionary<string, object>>(result);
    var d = val["d"] as Dictionary<string, object>;
    var wi = d["GetContextWebInformation"] as Dictionary<string, object>;
    formDigest = wi["FormDigestValue"].ToString();
    Console.WriteLine(formDigest);
    return formDigest;
    Then the following code is used:
    string result = string.Empty;
    Uri uri = new Uri(sharepointUrl.ToString() + "/_api/Web/lists/getByTitle('DemoList')/items(1)");
    HttpWebRequest wreq = (HttpWebRequest)WebRequest.Create(uri);
    wreq.Credentials = cred;
    wreq.Method = "POST";
    wreq.Accept = "application/json; odata=verbose";
    wreq.ContentType = "application/json; odata=verbose";
    wreq.Headers.Add( "X-HTTP-Method","MERGE");
    wreq.Headers.Add( "IF-MATCH", "*");
    wreq.Headers.Add("X-RequestDigest", GetFormDigest(cred));
    string stringData = "{'__metadata': { 'type': 'SP.Data.DemoListListItem' }, 'Title': 'updated!'}";
    wreq.ContentLength = stringData.Length;
    StreamWriter writer = new StreamWriter(wreq.GetRequestStream());
    writer.Write(stringData);
    writer.Flush();
    try {
    WebResponse wresp2 = wreq.GetResponse();
    using (StreamReader sr = new StreamReader(wresp2.GetResponseStream()))
    result = sr.ReadToEnd();
    catch (Exception e) { Console.WriteLine("An error occurred: '{0}'", e); }
    It errors out when it tries to send the command to Sharepoint.  I am NOT using a sharepoint hosted app.  I just wanted to directly contact sharepoint and update items.  Any help or suggestions would be greatly appreciated!
    Thanks,
    Priyank
     

    I just found some other code that seemed to work on editing a title and edited it kind of guessing it would work and it did!
    This is the code that ended working using the same digest code from above:
    Console.WriteLine("\n Newer Fancier Code \n");
    Uri uri = new Uri("https://SHAREPOINTURL/_api/web/lists/GetByTitle('Demo')/items(1)");
    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
    request.ContentType = "application/json;odata=verbose";
    request.Headers["X-RequestDigest"] = GetFormDigest(cred);
    request.Headers["X-HTTP-Method"] = "MERGE";
    request.Headers["IF-MATCH"] = "*";
    request.Credentials = cred;
    request.Accept = "application/json;odata=verbose";
    request.Method = "POST";
    string stringData = "{ '__metadata': { 'type': 'SP.ListItem' }, 'Location': 'updatedinfo' }";
    request.ContentLength = stringData.Length;
    StreamWriter writer = new StreamWriter(request.GetRequestStream());
    writer.Write(stringData);
    writer.Flush();
    HttpWebResponse response = (HttpWebResponse)request.GetResponse();
    StreamReader reader = new StreamReader(response.GetResponseStream());
    Just fyi if anyone was wondering.  Next, I'm going to be trying to update multiple fields, possibly multiple items if possible if anyone knows how to do that.

  • Update list item with multiple lookup

    I want to write a workflow to append project name (from list project) to a lookup column (mutiple value) in another list. I use update list item and put follwing string in multiple lookup column:
    [%CurrentItem:ID%];#[%Current Item: Project%]
    I find the lookup column will be replaced always with new project name. But I want to append the project name to existing vaule. How can I do that?

    thank you for the replying. I have just solved this issue. I save the string every time in a column and append the project name in the string column and put the whole string in mutiple lookup column. then the new value will be appended in lookup column. it
    seems like followings:
    1. time: ID1;#Project1
    2. time: ID1;#project1;#ID2;#project2
    3. time: ID1;#project1;ID2;#project2;#ID3;#project3

  • How to send a list item value to URL to open data related to item value

    Hi,
    Iam using Apex4.0 and iam facing some problem. Iam unable to send selected list item value to the url specified in the HTMl region.
    Here i want to open the data related to list item value in other page.
    List item - :Familyp
    i want to pass this selected value to the url and when ever user selected the list item and clicks on the url, then it should display the item value related data in new page.
    I tried with &FamilyP in url but it's not working. Any one help me plz.
    Regards
    Vamsi.Tata

    Is it a normal Select list or Multi Select list?
    If you have select list that allows you to select multiple options then you cannot pass it through URL. Multi-select /Shuttle keep colon separated list in the item, and this confuses Apex because the Apex URL uses colons for a different purpose. No escaping or URL encoding will help.
    If it is normal select list that allows selection of only one option then you can pass through the url. Unless of course the data has a colon in it.
    For multi-select, and when the value contains colon, the only way is to save the value in session state, same page item or any other place like Application Item, and then reference it at the other end. Never pass through the URL.
    Regards,

  • How to update list item using client object model without changing created/modified dates?

    Hello All,
    I want to update list item using the SharePoint Client Object
    Model without updating the created / modified date. Is it possible?
    Please help.
    Thanks.

    Using the SystemUpdate method should do the trick, according
    to its literature.
    Additionally, would something like this be of any use for you?  Taken from this
    Stack Exchange thread: -
    public static class SPListItemExtensions
    /// <summary>
    /// Provides ability to update list item without firing event receiver.
    /// </summary>
    /// <param name="item"></param>
    /// <param name="doNotFireEvents">Disables firing event receiver while updating item.</param>
    public static void Update(this SPListItem item, bool doNotFireEvents)
    SPItemEventReceiverHandling rh = new SPItemEventReceiverHandling();
    if (doNotFireEvents)
    try
    rh.DisableEventFiring();
    item.Update();
    finally
    rh.EnableEventFiring();
    else
    item.Update();
    /// <summary>
    /// Provides ability to update list item without firing event receiver.
    /// </summary>
    /// <param name="item"></param>
    /// <param name="incrementListItemVersion"></param>
    /// <param name="doNotFireEvents">Disables firing event receiver while updating item.</param>
    public static void SystemUpdate(this SPListItem item, bool incrementListItemVersion, bool doNotFireEvents)
    SPItemEventReceiverHandling rh = new SPItemEventReceiverHandling();
    if (doNotFireEvents)
    try
    rh.DisableEventFiring();
    item.SystemUpdate(incrementListItemVersion);
    finally
    rh.EnableEventFiring();
    else
    item.SystemUpdate(incrementListItemVersion);
    /// <summary>
    /// Provides ability to update list item without firing event receiver.
    /// </summary>
    /// <param name="item"></param>
    /// <param name="doNotFireEvents">Disables firing event receiver while updating item.</param>
    public static void SystemUpdate(this SPListItem item, bool doNotFireEvents)
    SPItemEventReceiverHandling rh = new SPItemEventReceiverHandling();
    if (doNotFireEvents)
    try
    rh.DisableEventFiring();
    item.SystemUpdate();
    finally
    rh.EnableEventFiring();
    else
    item.SystemUpdate();
    private class SPItemEventReceiverHandling : SPItemEventReceiver
    public SPItemEventReceiverHandling() { }
    new public void DisableEventFiring()
    base.DisableEventFiring();
    new public void EnableEventFiring()
    base.EnableEventFiring();
    Steven Andrews
    SharePoint Business Analyst: LiveNation Entertainment
    Blog: baron72.wordpress.com
    Twitter: Follow @backpackerd00d
    My Wiki Articles:
    CodePlex Corner Series
    Please remember to mark your question as "answered" if this solves (or helps) your problem.

  • Access denied error when user saves updated list item

    After upgrading a site collection from Sharepoint 2010 to 2013, users with Contribute and Manage Lists permissions cannot save changes to items in lists. All permissions appear to be inherited correctly by the list and when running a permission check for
    the user it returns the expected results. I also tried setting the list to use custom permissions but that didn't help. The logs show the following error when trying to save an item:
    System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
    A Sharepoint Designer form is used to edit the items so I don't know if that is related to the issue. After the upgrade the form would not load and was giving a different error until I opened it in Designer 2013 and saved it again. Editing items as a farm
    administrator user works OK.

    Hi,
    According to your description, my understanding is that the users cannot update the list items after migrating to SharePoint 2013.
    Please check this article:http://technet.microsoft.com/en-us/library/gg251985.aspx.
    This is taken from that article:
    "Users who submit valid credentials when accessing the migrated web application might be notified that they do not have permissions. If this occurs, the portalsuperuseraccount property and the portalsuperreaderaccount property of the web application
    were probably configured prior to migration. If this is the case, update the portalsuperuseraccount property and the portalsuperreaderaccount property to use the new claims-based account name. After migration, you can find the new claims-based account name
    in the web application policy for the migrated web application."
    Please update these accounts use the following PowerShell script to see if the issue still occurs:
    $webApp = Get-SPWebApplication "http://<server>/"
    $webApp.Properties["portalsuperuseraccount"] = "i:0#.w|domain\superuser"
    $webApp.Properties["portalsuperreaderaccount"] = "i:0#.w|domain\superreader"
    $webApp.Update()
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Sharepoint Designer Copy list item over to new list when certain value is met

    Hi,
    I am copying over an item in one list over to a new list once it meets certain criteria. I have attached the workflow of what I am trying to do here. I have also attached a screenshot of the list on which I am moving item. The list I am moving item
    to is identical.
    For some reason however this is not working for me. What is happening is when I change the value of 'Current Status' to anyying at all the item is moving. I only want the item to move when it is set to 'Solution Agreed'.
    - Body text cannot contain images or links until we are able to verify your account.
    Thanks,
    Martin

    Hi,
    According to your post, my understanding is that you want to copy a specific list item to another list using workflow.
    I have two list “CustomList001” and “CustomList002”. The list contains two column “Title” and “Current Status”(Choice type). Then I create a workflow for “CustomList001”.
    The following workflow step for your reference:
    Best Regards
    Dennis Guo
    TechNet Community Support

  • How does sharepoint designer create list item work ?.

    I'am using office 365, and sharepoint-designer (not the pro designer).
    There is a workflow rule that allows for creating items in another list.
    What i need to do is that if someone creates an entry in List A
    That List B gets an update too, based upon List A, and also a 4th list entry of list C (ea string containing "life cycle start").
    The workflow with the "rule create item in list", i've set to "start automatically when a new item is created".
    So far i've not been able to make it work, and the workflow Always suspends with vague errors, and since it is hosted i cannt do much with the errors.
    Could therefore anyone point me to a good youtube explaining this  function.
    Or might possible point out what often goes wrong when people use this.
    Maybe give some examples

    Yeeha !!!
    I got the first part working now; recap of howto:
    First of all, before you create lists and columns write it down on paper, so you will be sure about what names you will give them, as renaming these kinds of things later,  will only rename their view but not their old internal name, and as a result you
    will get lost if you want to automate stuff later on.
    So have you design ready (or in my case; delete current wrong site and start over clean).
    Recap :
    Using SharePoint designer:
    Create List A, use titles as the field to enter product names (or whatever item you like to registrate).
    Use the web browser:
    Goto List A you just made and set the title column to contain (required) unique index names.
    You can do this as Admin through list setting in the list top ribbon.
    Create List B using Sharepoint designer (simple list)
    In List B create a Lookup list to List A
    And select it so that you would like to see the title column in it.
    Using the web brouwser, make this column a required field (will become a (*) mark later).
    Using SharePoint designer, select list A.
    Select properties of List A, create a new (basic) workflow for it.
    Here you would assume that you need to get the title in List B, but that's wrong
    What one needs to get in List B a new to the current added Item in List A is the following:
    Note that the workflow will run under the context of new Items who are added to List A
    Create an action rule "Create list item" in the following list, and here select List B
    The pop will show you some fields marked with a (*) as required fields.
    Now the tricky thing is that is a reference to List A, and not a string.
    So you might think its a GUID then or so, but no wrong again.
    To get the link to the current List item A inside B.
    You will have to link it to  "Current Item"   (remember the workflow started from list A )
    And from the Current Item, you have to select the "ID" property.
    Apparently ID is internally used as a reference.
    Now whenever you create an Item in list A, it will be created in List B as well as a linked reference.
    So for example in A you could add more columns, like serial ID or creation time of article A.
    Then you don't have to add these into List B, as when people click on the hyperlink in List B they will be shown the details from list A.

  • How to Get the required List Item values by using Where Clause

    I have two tables named "TAX_RULES","BILL"
    1. " Tax_Rules" (Sub_Head_Code,Tax_ID,Tax_Percentage)
    { While "Sub_Head_Code" field is unique,
    Tax_ID describes that there are two kinds of Tax_IDs based on Tax_percentage which is 6% for some Sub_Head_Codes and 3.5% for the remainng Sub_Head_Codes. I have given Tax_ID 1 for 6% and Tax_ID 2 for Sub_Head_codes having 3.5%. }
    2. "BILL" (Bill_ID,Sub_Head_Code,Tax_ID,Bill_Amount)
    {While "Bill_ID" describes unique Bill Identification Number,
    Sub_Head_Code and Tax_ID are behaving like composite foreign key from Tax_Rules table}
    I have design form for both tables.
    In BILL form i am trying to get values of Tax_ID from Tax_Rules table at run-time by using WHEN-NEW-FORM-INSTANCE.
    For this whenever i select a Sub_Head_Code in Bill Form, all the Tax_IDs that i have recorded against each Sub_Head_Code which is either 1 or 2 against 6% and 3.5% respectively.
    But I want that whenever i select a "Sub_Head_Code", Only that Tax_ID which is associated with that Sub_Head_Code ahould come in the LIST ITEM.
    I have used WHERE clause but that is useless.
    Following is the Code that i have applied in the WHE-NEW-ITEM-INSTANCE Trigger at FORM LEVEL
    <CODE>
    DECLARE
         rg_n1 VARCHAR2(40) :='TAX_ID';
         rg_idn1 RecordGroup;
         gc_idn1 GroupColumn;
         errcode NUMBER;
    BEGIN
         CLEAR_LIST('BILL.TAX_ID');
         rg_idn1 := Find_Group(rg_n1);
    IF      Id_Null(rg_idn1) then
              rg_idn1 := Create_Group(rg_n1);
         gc_idn1 := Add_Group_Column(rg_idn1,'EXPLAIN',CHAR_COLUMN,60);     
              gc_idn1 := Add_Group_Column(rg_idn1,'TAX_ID',CHAR_COLUMN,3);
         END IF;
         errcode := Populate_Group_With_Query(rg_idn1,'select TAX_ID,TAX_ID from TAX_RULES');
         POPULATE_LIST('BILL.TAX_ID',RG_IDn1);
    END;
    </CODE>

    In the Tax Rules table, you state:
    "Sub_Head_Code" field is unique
    In the Bill table, you state:
    Sub_Head_Code and Tax_ID are behaving like composite foreign key from Tax_Rules table
    If the Sub_Head_Code is unique, then it's acting as a primary key, so Sub_Head_Code and Tax_ID in the Bill table are not behaving like a composite foreign key. The Sub_Head_Code is a foreign key, and the Tax_ID is irrelevant as far as keys are concerned.
    It is not clear what it is you want to do.
    If you want to display the Tax_IDs from the Bill table when you select a Sub_Head_Code from the Tax_Rules table, then change your query to:
    select TAX_ID, TAX_ID from BILL where Sub_Head_Code = :Tax_Rules.Sub_Head_Code
    If you want to display the Tax_IDs from the Tax_Rules table when you select a Sub_Head_Code from the Bill table, then change your query to:
    select TAX_ID, TAX_ID from TAX_RULES where Sub_Head_Code = :Bill.Sub_Head_Code
    If this is not what you want, then clarify what it is you want to do. Don't say:
    "I want that whenever i select a "Sub_Head_Code", Only that Tax_ID which is associated with that Sub_Head_Code"
    because it is not clear what tables you are referring to.

  • How to refresh list item values before report is run?

    We have two SELECT LIST items (drop boxes) on our report. One SELECT LIST has values of "World Region" (e.g. NORTH AMERICA, SOUTH AMERICA, EUROPE, ASIA)
    the other SELECT LIST has values of "Subregion" (e.g. NORTHERN EUROPE, SOUTHERN EUROPE, SOUTHEAST ASIA etc...)
    The values in the Subregion list are dependent on the value that is chosen from the "World Region" List. Can someone tell up how to update the values in the Subregion list BEFORE we submit the page? We can get these values to update (via sql query) when the page is submitted but that is only happening after the report gets run- which is not what we want. We want the user to select a Region from one SELECT LIST and then see all the qualifying Subregions for that Region in the Subregion SELECT LIST. Only after both Region and Subregion have been selected do we want to run the report. Thank for any help on this.

    hey john--
    john) things like Scott's reference to "The name of the LOV Item". What does this really mean?
    raj) in htmldb there's a concept of items at the page and at the app level. page level items have ui component associated with them. in scott's explanation above, he's talking about using a page-level item with a "Display as" type of "select list w/submit" for your first select list. in that case, he's suggesting you have one select list item drive the values of another. when the self-submitting select list submits the page, it sets an htmldb built-in variable called :REQUEST to the name of the self-submitting select list item. in your follow-up post's example, that'd be "REGION_LIST". scott was explaining how you could control the functionality on your page by adding conditions to things like...
    :REQUEST = 'REGION_LIST'
    ...or using declarative Condition options like "Request = Expression 1" and then putting the string "REGION_LIST" in that Expression1 field. so in your case, you have a report region that you don't want displayed until the user's done selecting from your Subregion list. an easy way to handle that would be to add a hidden item (where "Display as" is set to "Hidden") to your page, for example :P1_LAST_REQUEST, to store the last value of :REQUEST. put a Computation on your page that populates :P1_LAST_REQUEST with :REQUEST each time the page is submitted. then put a Condition on your report region that makes it only render when :P1_LAST_REQUEST != 'REGION_LIST'. so this way your users can select a Region and have the page submit itself. the page will then redraw with the values of subregion list correctly populated (you'd presumably use :REGION_LIST in your subregion LOV query to achieve the filtered values) w/o your report region displayed. the user would then select a correct subregion and click some sort of "run my report" button. this time when the page redraws, :P1_LAST_REQUEST would be set so something other than "REGION_LIST" (it'd be set to whatever you named your "run my report button") and so your report region would display as desired.
    hope this helps,
    raj

Maybe you are looking for

  • Error while running the query

    Hi Friends, I am getting this error when I execute the query. Error message : Warning You do not have authorization to read object ZCOMPCODE 'Company Code'. Only I get this error, my friends can execute the same report w/o any issues. Can anyone sugg

  • IE 8 seems to be less help for a rounded table corner...

    Hi, I'm using DW CS3 on an intel iMac and first, 2 things: I use tables to build my sites (there's some CSS around here and there + a couple of external style sheets etc) and secondly, the problem I'm asking about here does not seem to occur at all o

  • What Generation MacBook is from Early 2009?

    I'm looking to upgrade the RAM in my MacBook. It's the early 2009 model, it currently has 2 GB of RAM, which means it has two 1 GB RAM modules. I was trying to find it in the RAM section of Apple's online store, but they're listed by generation there

  • Labiew lib for modbus over RS485 over USB

    Hi, I have the following problem which I would be grateful for any help to solve. I have a digital meter device (lumel NA5) which has RS485 interface, and modbus protocol over it. A possible solution I'm contemplating is to get a RS485 to USB convert

  • Load problome

    Hi Experts When i am loading deltas i am getting this error please help me Systax error in RSCDELTA Could any body help ????? thanls Sudha