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 have a Document Library with a column (we'll call it ColumnName) and a Web Parts Page with a value assigned for that column. On that page I have a list view displaying the Doc Library files and a Filter Web Part set to only show docs with the column value of that page, connected to the list view.

Instead of showing the correct files (including the current page), it shows nothing. When I click on the filter, it shows it as 1;#ColumnName instead of ColumnName. I've tried other values, and it shows them the same way- i.e. 2;#OtherColumn (I'm guessing the number is the ID or something).

ColumnName values are a Lookup from another list- could that be part of the problem? Any ideas on a workaround?

share|improve this question

Nope, it isn't a bug. When you fetch the value of a lookupfield, it tells prepends the field index reference. Nice huh?

However, there is a way to have your cake and eat it, too:

You can create a workflow using Sharepoint Designer that reads the value of the lookup columns. The workflow has the option to render the 1#;value as just value like you want. There are two modes: "As String" and "Lookup Value (as Text)". The first mode is default (with the 1#;) and the second one is the clean mode you want.

Fetch variable from field with workflow

Then you create another field in your list, and have the workflow place that clean value in that field. Then you can filter with it.

For more details, check this thread.

share|improve this answer

If your column is a lookup then that is the format it will store the values in the list though I have never seen it appear on the column name?

Have you tried setting the filter value to include the ID in this format?

share|improve this answer
How do I set the filter value to include the ID? It only shows me the column name (I have SPD as well if that helps) – user15574 Mar 14 '13 at 13:49
I'm thinking this question is a duplicate of this link, and this is a serious bug. The workaround I have for now is to use the filter web part to set a parameter, and then use xslt to check where the parameter contains the ColumnName value. – user15574 Mar 14 '13 at 18:41
also duplicate of this – user15574 Mar 14 '13 at 21:48

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.