SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm building a tab based on a list in the list i have something like this: Title Categories Bread Food Mazda Car VW Car Egg Food

How can i get a unique value in the category field? I tried using marcs method from: But its not working with SP 2010 sharepoint designer... Any ideas and thanks in advance

share|improve this question

If you need to do this in pure XSL you can use xsl:key to pick out the unique values in your XML data. The key element is often used with the Muenchian method to render the groupings

If you are coding in C# then I'm not aware of any CAML support for Distinct queries. So you'll need to retrieve the full data set and "distinct" it yourself. .Net has some support for this in DataTable.ToTable

share|improve this answer

SharePoint 2010 gives you the ability to create unique list columns OOB. So you can edit the properties of the Categories field and mark it to contain unique values.

share|improve this answer
problem solved used xsl:key :) – Patrick Nov 3 '10 at 23:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.