Link to home
Start Free TrialLog in
Avatar of Alarius
AlariusFlag for Afghanistan

asked on

Search specific Picture Library

We have a picture library with images of products. The title of each picture is the product #.
I'm trying to figure out how to set up a search function which enables the user to type in the product # and get the picture.
I know we can use a Form web part to search a custom list, but it doesn't work for Picture libraries.
Avatar of arduk
arduk

Not sure why the default search doesn't work for you, as I believe it searches on title as well as filename, however, if you are happy to filter rather than search then:

you can filter a list simply by filename by adding the following to the querystring:
&FilterField1=Title&FilterValue1=product1 - this will filter on the "Title" property
&FilterField1=FileLeafRef&FilterValue1=[FILENAME] - this will filter on the filename of the document

where [FILENAME] is the full filename of the image eg. product1.jpg

You could add a web part with a text box and a button, and redirect to the same url with the appended query string so that it filters it based on what was entered in the text box.

Pretty simple, but may be enough for what you're looking for...

Hope this helps...
Avatar of Alarius

ASKER

I don't understand the bit about the query string..

The default search, crawls the whole site.. which is not what is required. It needs to be specific to that particular picture library.
re the querystring - do the following, and it may clarify it a little for you:
browse to your picture library
at the end of the URL, paste in the following ( you will need to adjust it so that it contains a filename that is actually in the picture library)
?FilterField1=FileLeafRef&FilterValue1=[FILENAME]
where [FILENAME] is the full filename of the image eg. product1.jpg

This should filter the list, and show only the file with the filename that you have entered.

Also, if you browse to the list, do you get a search box at the top which allows you to search "this list:..." - does this do what you're looking for?

Are you using MOSS or WSS? I am seeing this on MOSS, and currently don't have a plain WSS install, so am not sure if it is different...


Avatar of Alarius

ASKER

The filter ?FilterField1=FileLeafRef&FilterValue1=AR7P.jpg comes up with no results (I added it to the end of the url: http://umgsharepoint.na.adglob.net/dept/shipping/Part%20Images/Forms/AllItems.aspx
There is no searh box in the list view.

We are using MOSS.
ASKER CERTIFIED SOLUTION
Avatar of arduk
arduk

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Alarius

ASKER

Found the typo... was using ?FilterField1=FileLeafRef&FilterValue1=AR7P.jpg instead of
?&FilterField1=FileLeafRef&FilterValue1=AR7P.jpg (missing the &)
Avatar of Alarius

ASKER

Got the custom search results using custom scope working as well... very neat!
Avatar of Alarius

ASKER

Thanks for your patience.. this is given me a lot of options to work with!!