.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Updating an item in one list based on data from another

Posted By:      Posted Date: September 14, 2010    Points: 0   Category :SharePoint
I thought I understood this fairly well, but it seems that I am missing something.  I have created a change management site that uses a calendar list to mark upcoming changes to our IT systems.  I have also created a second list to track some information about the change items that I don't want to show up on the calendar, such as what the outcome of the change was or if the change process was properly followed.  So I have the calendar list and another list called results.  I know that there needs to be a unique identifier that each list item will have in common, so in the results list I created a column called Change Number.  When a new change item is created in the Change Management calendar a workflow runs that notifies some people that a new change has been submitted, and the last step in that workflow creates a new list item in the results list and sets the Change Number field to be equal to the current item ID field.  That part is working right now.  When I create a new change item I can open the results list and see that there is a new item and it has the proper number in the Change Number field. What isn't working is when I try to take actions in other workflows that use data from both lists.  An example is notifying the creator of the change that it has been approved.  When the list item is changed a workflow starts that

View Complete Post

More Related Resource Links

Updating a list item based on the value of a different list item

Ok, I've searched everywhere and have gotten mixed information about whether this is possible with standard Sharepoint functions.  I new at Sharepoint, but I'm doing this to help out the department which is short of help right now.  Here's what I'm intending to do - We need a small ticketing system to track software requests.  I created a basic list that accomplishes this fine.  I created another list with criteria that software must meet in order to be approved called software evaluations.  I made a "choice" column called approval status in both lists that have the following options: Approved, Pending, Rejected.  I'd like the softwarerequests.approvalstatus to mirror whatever the softwareevaluations.approvalstatus column value is.  I created a workflow using SPD and it's seemingly easy to use.  I attached it to the softwarevaluations list and set the following as the matching criteria: if softwareevaluations.approvalstatus = "approved" then softwarerequests.approvalstatus = "approved". It mentions that the values aren't unique, but I accept anyway.  It doesn't do anything and I'm thinking it might be because it doesn't know what "issue" to reference.    I feel I'm all over the place right now, so it might be easier if someone just asks me what you need to know to help.

problem...i want a list item to populate all data in gridview!!!


i have a dropdownbox and a gridview

what I want is to have a list item which populates all data in a gridview.

I have tried using list item selected value=0 but to no avail.

what is the easiest way to achieve this?

Updating a List item field value in a SPD Workflow is setting Date fields to null

Hello everybody,I faced a very weird behavior while creating a workflow in SPD against a Document Library.Here is the case:1- Create a document library in sharepoint site.2- Add a custom column of type DATE.3- Upload any document to the library4- Edit the item metadata and set the custom date field to any date you want.5- Now using sharepoint designer, create a very simple Workflow with only one action that updates the current item "Title" field to any value. (Note: In my case I set the workflow to start manually and not automatically)6- Save the workflow and then start it on the uploaded item.7- Now check the value of the date column after the workflow is finished.8- You will see that the Date field is Empty... (very weird)Notes:   1-This behavior will not appear on a standard list. it is only appearing in a Document library.  2- I am using WSS 3.0 SP2 + MOSS 2007 SP2. Also SharePoint designer 2007 SP2Did anyone face this situation and does it have a fix, or am I doing something wrong here... Please help.Regards,Maheed

Invalid data has been used to update the list Item.(List definition)

<nativehr>0x80070057</nativehr><nativestack></nativestack>Invalid data has been used to update the list item. The field you are trying to update may be read only. I have created a list definition and into that i have created lookup column when i am trying to add any item into the list then it gives me an error as above. Can anyone help me.? I made the readonly attributes to false for lookup columns.  

Dynamic list item title based on date created & regional settings?

I have a list of things that doesn't *need* a title.  However, because sharepoint uses Title for links, RSS etc  I tried generating a title in an event handler.   This would work great if I wasn't basing it on a date field: public override void ItemAdding(SPItemEventProperties properties) { DateTime dt = Convert.ToDateTime(properties.AfterProperties["TestDate"]); properties.AfterProperties["Title"] = dt.ToShortDateString(); base.ItemAdding(properties); } In testing, this sets the title to "8/9/2010" when I selected 8/10/2010 in the date picker.  I figure this is because of the regional settings of my test user.  I can probably correct the title value for 'test user' but that won't fix 'test user in mongolia' who would still see two different values. So What I would like is to have the Title always display the value MyDate in the uesr's locale.  So the field needs to be dynamic not only at edit/update time, but at display time. Does anybody know if this can be accomplished, and more specifically how?

Invalid data has been used to update the list item in sharepoint 2010.

I have created a custom list definition with one lookup field <      Field ID="{865CD714-7DF6-4F65-9DBC-5FE910B10BC5}" Name="CompanyName" DisplayName="Company Name" Group="Custom contents" Description="Select Company" Type="Lookup" ShowField="CompanyName" Required="FALSE" FieldRef="CompanyName" List="Lists/LookupListDefinition-ListInstance1" ReadOnly="FALSE"></Field>   <nativehr>0x80070057</nativehr><nativestack></nativestack>Invalid data has been used to update the list item. The field you are trying to update may be read only. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. My solution is perfectly get deployed on site. I can see the list instance created on site its also appears on quicklaunch. When i am trying to add the item into the custom list using UI then i am getting the input form correctly i can see the lookup values in dropdown list but when i click on save button then its give me an error as mention above. For debugging purpose i have created the event reciver class for list item adding event. In that i have check the column status and

Updating list item values in SharePoint Designer using code

Is it possible to programmatically modify the SharePoint objects using SharePoint Designer Object Model. By that I mean coding in SharePoint Designer (not Visual Studio). For example, can we access the list items of a list programmatically and change their values? I can do all this in Visual Studio using SharePoint Object Model but I don’t find a way of achieving this by using programming in SharePoint Designer. I searched through http://msdn.microsoft.com/en-us/library/bb208639(office.12).aspx but no success. If the answer is yes. Can someone please give example(s) or point to some articles etc? Thanks in advance.

How to copy a Column data from one List to another list whenever a new item created .


Hello ,


I have List A and List B

List A


Ticket ID

Column A

Column B

Column C


List B


Ticket ID

Column 1

Column 2

Column 3

I want to copy only Ticket ID from List A to List B , whenever a new item created in List A.

can you please give your thoughts?

how to do it?

Thanks in Advance!


Share Knowledge and Spread Love!

Is it possible for a list item to get real-time data from another list?


I'm installing a custom feature into a site collection.  The feature will allow the creation of a list (list A) that gets its column data from an external webservice.  The Actions menu will have a menu item that will provide an update to all the data in the list.

I want to create List B in the same site.  List B will have the same columns as List A, but will have additional columns.  I need to figure out if it is possible for List B to pull that common column data from List A.  I thought I could use a workflow action on the creation of each item in List B to go get the data from List A columns, but that leaves the problem of updating the column data in List B when List A is updated.

Does anyone know of a way I can make this happen or another approach I could take?

There are no mistakes; every result tells you something of value about what your are trying to accomplish.

Item Event Receivers or way to validate data entered for External List in SharePoint 2010?

Hi everyone,

Are there Item Event Receivers for External List in SharePoint 2010? If not, is there a way to validate the item data entered from External List UI in SharePoint site?


How to retrive Data from SharePoint List to Data Grid View in Visual WebParts based on the Condition

Hi Friends... 
Here i write this Code for Retrieving Data Form SharePoint List to Data Grid view (st_attendance) in Visual Web parts....  But it doesn't work Properly....

SPWeb web = SPContext.Current.Web;
            SPList list = web.Lists["Student Profile"];
                string caml = string.Format(@"<Where><Eq><FieldRef Name='Academic Year' /><Value Type='Text'>{0}</Value></Eq></Where>",DropDownList2.Text );
                SPQuery query = new SPQuery(list.DefaultView);
                query.Query = caml;
                SPListItemCollection items = list.GetItems(query);
                st_attendence.DataSource = items;
                Controls.Add(st_attendence );

How to retrive Data from SharePoint List to Data Grid View in Visual WebParts based on the Condition

Hello Friends,

I am Srinivas, I want to know the How to retrive the Data from SharePoint List to Data Grid View in Visual WebParts based on the Condition.

Example: I want to retrive Students information from Lists to Grid View based on the Condition(based on 'Academic year' or 'Class' and 'Section'). In Student Status Page Grid view should be show the Student Details in their Status.

please any body help me



How to retrive Data from SharePoint List to Data Grid View in Visual WebParts based on the Condition


Hello Friends,

     I am Ali, I want to know How to retrive the Data from SharePoint List to Data Grid View in Visual WebParts based on the Condition.

Example: I want to retrive Students information from Lists to Grid View based on the Condition(based on 'Academic year' or 'Class' and 'Section').         In Student Status Page Grid view should be show the Student Details in their Status.

please any body help me



How to retrieve Data from SharePoint List to Data Grid View in Visual WebParts based on the Conditi


Hi Friends..

I am Srinivas Devi

I want to retrieve data from SharePoint List to Data Grid View using Visual Web parts. I want know how to write a LINQ query for retrieve data from Share Point List to Grid View based on two or More Conditions.

Like based on Employee Number, Employee Department etc...

Please Help me Sir..

Thank U Sir..



How to use Designer to create a WF to collect data and update item in the list



I’m trying to create a workflow in SharePoint Designer 2007 to finish the item in the list. In the list, I setup 10 fields (Name, Address, Phone#....), and in the workflow, I set it to start automatically when a new item added in the list (I can add a new Name in the list to start the workflow).


In the step1:

The Conditions is: “If Address is empty”.

The Actions is: “Collect all data from lw1990 (Output to Variable: collect1)


At this point, I don’t know how to update the current item in the list with the data that just collected from user in Variable:

Workflow. Copy item to new list - problem updating additional fields in the new list record




I'm having a couple of problems


I have a list, List A. On a couple of triggers I want list A to copy fields to a new record in List B.

Many of the columns are the same Say, column1, column 2, colmn 3. The Copy Item is working fine.


I then want to amend several fields in the new record in List B to reflect the new info from list A, and create info in a fields (say ListBcolum4 type choice and ListBcolum5 single line).

For the life of me I cant get this to work... ive tried updating fields, creating items...

A pointer on how to do this would be greatfully received.

No title displayed in the "New" item creationfor a list based on a created list template.


Hello everybody,

I have a problem with a sharepoint list template. I created a custom list in MOSS2007 that I saved as template. The problem is that the new list based on that saved template doens't display the Title (changed on project's name) when I want to create a new item. So after creating new items, their Project's Name (Title) is set to (none) for all of them because I couldn't specify any Project's Name (Title).

I was back to my original list and when I create a new item, the Project's Name is displayed so I can fill it. I searched in the list settings and nothing was special.

The columns are required in both lists, there is no management of content types (maybe a hidden field but NO!), the list is a typical list with basic settings.

Has someone an idea?

I want to reuse this list and the Project's Name (Title) is very important (!).


Thank you.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend