?
Solved

Document Library Dataview Filter error

Posted on 2010-03-29
3
Medium Priority
?
571 Views
Last Modified: 2012-05-09
I have a document library in which I would like to filter based on a substring
of the file name. Basically, I'm wanting to only show the documents in which
there is a underscore for the fifth letter of the "Name" field.

I created a document library view, opened in SPD and converted it to a data
view.
I clicked on Filter and then checked ADD XSLT filtering and clicked the Edit
button.

I added the following code to the filter:

[substring(/dsQueryResponse/Rows/Row/@FileLeafRef,5,1)='_']

I click Ok and get the following message:
Failed setting processor stylesheet: 0x80004005: Expression must evaluate to a
node set.

Could someone help me with this? I'm not that familiar with doing advanced
coding in a dataview so I'm not sure what I'm doing wrong.

Thanks.

0
Comment
Question by:imstac73
  • 2
3 Comments
 
LVL 21

Accepted Solution

by:
66866 earned 1000 total points
ID: 29103210
try
[substring(@FileRef,5,1)='_']
0
 

Author Comment

by:imstac73
ID: 29105498
That worked!  Thanks so much.
0
 
LVL 21

Expert Comment

by:66866
ID: 29105629
No problemo
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Scenario: Let’s say you have a quote worksheet in Excel that you use to work up sales figures and such for your clients. You utilize SharePoint to manage and keep track of these documents. You would like values from your worksheet to populate Sh…
I tried to use the SharePoint app to Import a Spreadsheet and import an Excel sheet into a Team site made in SharePoint 2016. But that just resulted in getting an error message 'Unknown Error'...
SQL Database Recovery Software repairs the MDF & NDF Files, corrupted due to hardware related issues or software related errors. Provides preview of recovered database objects and allows saving in either MSSQL, CSV, HTML or XLS format. Ensures recov…
Hi, this video explains a free download that you can incorporate into your Access databases, or use stand-alone for contact management. Contacts -- Names, Addresses, Phone Numbers, eMail Addresses, Websites, Lists, Projects, Notes, Attachments…
Suggested Courses

592 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question