Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a large document library that has a bunch of dropdown fields that I'm using as refinements. The refinements should come back as:

ANIMALS

Cat
Dog
Mouse

But what I'm seeing is that it's coming back like this:

ANIMALS

Cat
Dog
1
Mouse
2

I inspected the field value, and the values are stored as:

1;#Dog

And inspecting the documents that are showing up as the numbers in the refinements, they appear to be normal. Re-saving doesn't help. It looks like there's only a small number of documents it's happening to (~3%). And on the documents, of 4 dropdown values, it's not always all of the dropdown values are appearing as numbers, it's sometimes mixed: (1, 4, Dog, Foo).

Has anybody seen anything like this? Any idea what's going on or how best to clean this up?

share|improve this question
    
Did you switch column types from Choice to Lookup (or vice versa)? –  Kit Menke May 7 '11 at 14:29
    
Hmm...I inherited the site so that's a definite possibility. So you're thinking anything marked with the Choice would keep it's integer value...I can see that. I think I'm gonna write a powershell script to re-save all the list items, and I'll post with my results! –  Sean Regan May 9 '11 at 12:02
    
By the way, re-saving all of the files via a powershell script did the trick! –  Sean Regan May 12 '11 at 4:05
1  
Do you want to add that information as an answer and accept it? Might be helpful for other people in the future. –  Kit Menke May 12 '11 at 13:47
add comment

2 Answers

Take a look at Charlie Holland's article: "Building a custom refinement filter generator for SharePoint 2010"

It contains a step-by-step guide, and even has the source code available as a Codeplex project.

share|improve this answer
    
Shaun: to add more value to your answer, please try and be more verbose when answering. :-) –  Anders Rask May 7 '11 at 21:23
add comment

I wound up saving all of the items in the site using the following script, and that did the trick.

$totalCount = 0

$web = Get-SPWeb "http://dev.site.com"

$list = $web.Lists["Documents"]

foreach ($listItem in $list.Items)
{
    $listItem.Update()
    $totalCount++
    Write-Host "Item saved: " $totalCount
}

Write-Host "Total Items Updated = " $totalCount

$web.Dispose() 
share|improve this answer
add comment

Your Answer

 
discard

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.