Dispaly unique Records in sharpeoint List
Hi, How to Dispaly Unique List Item records in sharpeoint list..?Thanks & Regards, Sruthi
December 20th, 2010 1:58am

Hi, Do you mean by code? Akram
Free Windows Admin Tool Kit Click here and download it now
December 20th, 2010 9:09am

hi there is no analogue of DISTINCT SQL operation in CAML, so you can e.g. create a list view which will show unique items. But it can be implemented using custom code: you just need to iterate through SPList.Items collection and check whenever field you need for uniqueness. It is easy to do it using LINQ: SPList list = ...; var distinctItems = list.Items.Cast<SPListItem>().Distinct(customComparer); All you need to implement is customComparer which is inheritor of IEqualityComparer<SPListItem> internface. It will contain the logic of comparision of tow list items in order to find unique items. Blog - http://sadomovalex.blogspot.com CAML via C# - http://camlex.codeplex.com Graphs visualization in Sharepoint - http://spgraphviz.codeplex.com
December 20th, 2010 10:12am

No,,if its possible with out using code let me know..i want filter condition for showing unique items in the list for example: List A Column A Column B Column C Doe Red 1999 Doe White 2000 Jack purple 2001 I want to show only unique names in the list what would be the filter condition for this Thanks in advance..Thanks & Regards, Sruthi
Free Windows Admin Tool Kit Click here and download it now
December 20th, 2010 12:23pm

Your only real choice is to use Grouping within your view. They aren't really unique, tho. SharePoint Solution Architect, Developer
December 25th, 2010 11:09pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics