1

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?

2 Answers 2

1

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.

0

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?

3
  • 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, 2013 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, 2013 at 18:41
  • also duplicate of this
    – user15574
    Mar 14, 2013 at 21:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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