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

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

In Sharepoint, I'm trying to replace list items duplicates with most recent entry

Posted By:      Posted Date: December 04, 2010    Points: 0   Category :SharePoint

Hi I have a Sharepoint workflow that moves outdated items to a separate archived list.  When a new item is created in the archive list, i'd like the worklfow to find duplicate items based on 2 matching fields (Project Name and Reporting Cycle) and replace the older item with the new. 

Can this be done in SPD?

View Complete Post

More Related Resource Links

Creating Sites/Lists/List Items under Current User Context in SharePoint By Using SPUserToken

Usually we do this by performing the action under RunWithElevatedPrivileges method and updating the listitem using SPListItem.SystemUpdate() method (see here). but this approach has its own flaws like (RunWithElevatedPrivileges will run under system account, we cannot use SystemUpdate for SPSite,SPWeb,SPList, since it runs under system we will "CreatedBy" by as SystemAccount).

Display tooltip for Sharepoint list items


Hi All,

I am using MOSS 2007 and my requirement is to show tooltip when I hover the mouse over the title column for each item. I am planning on storing the tooltip string for each listitem in a seperate column. Is there a way to do it. I am sure there is. Any help is greatly appreciated.

Thanks in advance!




Filter items with a date column with parameters start date and end date on a sharepoint list?

If I have alist with a view that has the columns Title, Status and Status Date and the view has some items. How Can I add a filter with two parameters, start date and end date, to only show records with status date equal to or greater than parameter start date and status date is less than or equal to parameter end date? This is a sharepoint online site and I can't create and deploy custom code, can use SPD though. Do I need to use SPD or is this something I can do in the list settings? Thanks in advance.   Edit: I had a look here http://www.endusersharepoint.com/2009/09/29/sharepoint-date-filter-filtering-a-list-by-greater-than-or-equal-to-date/ but I don't have the Date Filter web part.

Rating for list items in sharepoint

Hi, As per our requirement i should make availability of ranking to the items of list.In codeplex i got the solution package where it gives that availability to rank for document library but not for list.Please let me know if you have any related articles? Thanks & Regards, Sudheer

Versioning lists in Sharepoint (not list items)

I need to keep a track of what all changes have been made to a custom list since it was first created. I need to have track of what columns were added/removed and when. I know that we have versioning for list items so as to keep track of what all changes have been made to an item but what I am looking for is versioning of the list itself rather than the list items. Is this possible?

How do I get the Sharepoint 2007 KPI to use the "Calculation using all list items in the view"

I have a custom SP list that contains a numeric column in the list and the view selected for the KPI. The option to calculate using all items in the view is grayed out.  Sometimes SP will let me create a KPI like this, then I go back to the webpart and the indicator has reverted back to just a simple count of the number of items in the list.  I want to use the "calculate all items" from a numeric column and have my KPI stay that way? Any thoughts?

how to access items inside Sharepoint List Folder

hi all i have a list with structure as below  QuckList(List)                A(Folder)                       1(List Items)                       2(List Items)                B(Folder)                        1(List Items)   i have to display the List items inside the folder in drop down   i am able to access the folder as Splistitem, but not able to access the items inside the folder   any ideas how to access the items inside the List Folder   ragava_28

SharePoint 2010 email enabled list with workflow has incorrect User ID when items are emailed to the

I have set up an approval workflow for a document library that has email enabled. Emails come into the document library fine, however, if an item is emailed to the library the workflow kicks off with the initiator as "System Account" rather than the person who submitted the email. This makes the error of "The e-mail message cannot be sent. Make sure the e-mail has a valid recipient." come up. If someone submits a document directly to the library (by logging into sharepoint and submitting) everything works fine. The person submitting by email is a valid sharepoint user and the profile shows the correct email address. The Created by and Modified by fields show the correct person (rather than System Account), it's only the workflow User ID that shows incorrectly if document is emailed to library. Any help or ideas would be appreciated. Thanks

SharePoint 2010 Export list Items to Excel, wrong url in iqy file

Hi, I have a SharePoint 2010 Environment that uses https://portal.<something>.com. Exporting to Excel of a list uses wrong URL. When I go to the a list, select the list to show the "office ribbon" and then select export to excel, excel will show the error "Excel cannot connect to the SharePoint List". When I take a look at the IQY file that is created it contains the wrong url: http://portal.<something>.com instead of https://portal.<something>.com Changing the URL in the IQY file manualy to https://portal.<something>.com and then opening it will excel is working fine, list data is exported to excel then. Alternate access mapping is configured to use https://portal.<something>.com as default, export to access is working normaly. I already deleted the http://portal.<something>.com alternate access mapping once to see if this fixes the problem. No fix, even not after IISreset or rebooting the server. Where or how is the export to Excel IQY file created and where is it possible to fix the URL it is putting in the IQY file? Grtz, Arjan

Maximum number of items in a SharePoint 2010 list

Hi, Is there a recommended maximum number of items that can go into a SharePoint 2010 list? I seem to recall that earlier versions seemed to have performance problems with more than 2000 items. I have a table that has some 50,000 records and would love to convert it into a list.   Thanks John JohnSpilker

Is there any facility to auto archive List items In Sharepoint 2007 and 2010?

i work for a software company, Recently client gave us a requirement where he need a functionality to archive list items based on its retention period... so i just wanted to know that is there any facility in Sarepoint 2007 or 2010 where we can auto archive list items.Kindly provide some information on this. thank you.

Sharepoint Export Import List Items



My requirement is to export the list items in Pages library with its meta data i.e. Created Time and Modified Time.

I am trying Export Import code, but it does not import time. It imports the CreatedBy and ModifiedBY acuurately but createdTIme and Modified Time comes as current time, the time i run the import.

Pls help


private static void ExportItems()
      string exportFolder = @"C:\exports\";
      string exportFileName = "Export_File.cmp";

      using (SPSite site = new SPSite(sourceSiteUrl))
        using (SPWeb oWeb = site.OpenWeb())
          SPList oList = oWeb.Lists["Pages"];
          SPListItem oItemA = oList.GetItemById(2480);

          SPExportObject exportObject = new SPExportObject();
          exportObject.Id = oItemA.UniqueId;
          exportObject.Type = SPDeploymentObjectType.ListItem;

          SPExportSettings exportSettings = new SPExportSettings();
          exportSettings.LogExportObjectsTable = true;
          exportSettings.LogFilePath = exportFolder + "Exportlog.log";
          exportSettings.SiteUrl = sourceSiteUrl;

Add items to sharepoint custom list using javascript with webservices



Here is the code snippet i was trying to insert item to sharepoint list but i conn't please help me what is wrong in my code and modify it.


function addlistitem(item)


var xmldoc;

var batch;

var FeedbackHTTP;

var ListName = 'Suggestions';

//The batch variable builds up the XML that we are going to submit to the SharePoint list via the SharePoint web service

batch = "<batch><method id='1' cmd='New'><field name='Title'>" + item + "</field></method></batch>";

xmldoc = '<?xml version="1.0" encoding="utf-8"?><soap:envelope xsi="http://www.w3.org/2001/XMLSchema-instance" xsd="http://www.w3.org/2001/XMLSchema" soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:body><updatelistitems xmlns="http://schemas.microsoft.com/sharepoint/soap/">'

xmldoc = xmldoc + '<listname>' + ListName + '</listname>';



xmldoc = xmldoc + '<updates>' + batch + '</updates></updatelistitems></soap:Body></soap:Envelope>';

FeedbackHTTP = new ActiveXObject("MSXML2.XMLHTTP.3.0");


Opening attachments to list items in SharePoint 2010



We have some sites that use lists with attachments (generally PDFs). When we click on the item and then on the attachment, we only get the option to Save or Cancel. I thought this might be related to the web applications Strict vs. Permissive setting, but it occurs even after switching the web app to permissive file handling. List attachments in Microsoft formats (word, excel) open correctly in the web apps, and PDFs in document libraries correctly show the Open option since switching the web application to permissive. Is there a way for that to affect list attachments as well?




How to delete a list item in Sharepoint that will also delete sub-items


I have a list of user information and on the DispForm.aspx page, I also have a section to insert sub-items (assets).  I would like to know how to setup a way so that when I delete the main item, it will delete all sub-items as well.  Any information would be greatly appreciated!


SharePoint Search to Only Include List Items


Hi all,

Was wondering if anyone new a way to only include list items when searching. Currently search returns list items and lists that contain a keyword.

I know i will have to create a custom scope but not much after that.

Any help at all would be greatly appreciated.


Creating SharePoint items with CreateItemActivity

Instead of creating new list items from code in your workflow you can use CreateItemActivity. CreateItemActivity can be used for creating list items or files. Properties of interest for this activity are the following (most of them are self-explanatory):
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