SharePoint Sandbox Custom Search in one particular folder

Hello:
Could someone please guide me or refer me some useful like for the following:
1) User will have the option to search some files
2) Search criteria are meta tag for that/those file(s)
- so there will be some text box or drop down to select some meta data
3) When user click the search button, a search should be performed only in one particular folder inside the SPSite
(i.e "Documents/UserGuest/Contact")
How can this be achieved with sandbox solution. Does SPServices would help anyway in this case? 

function searchList(folderName) {
    var nURL = "/_vti_bin/lists.asmx";
    var soapEnv = "<?xml version=\"1.0\" encoding=\"utf-8\"?> \
                             <soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
                              xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"
                              xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">
                              <soap:Body> \
                              <GetListItems xmlns=\"http://schemas.microsoft.com/sharepoint/soap/\">
                              <listName>{YourList}</listName> \
                              <viewFields></viewFields> \
                              <query><Query><Where><Contains><FieldRef Name='FileRef'
/><Value Type='Text'>"+folderName+"</Where></Query></query> \
                              <queryOptions><QueryOptions><ViewAttributes Scope='Recursive'/></QueryOptions></queryOptions>
                              </GetListItems> \
                                  </soap:Body> \
                              </soap:Envelope>";
    $.ajax({
        url: nURL,
        beforeSend: function(xhr) {
            xhr.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/sharepoint/soap/GetListItems");
        type: "POST",
        dataType: "xml",
        data: soapEnv,
        complete: processResults,
        contentType: "text/xml; charset=utf-8"
function processResults(xData, status)
   result = $(xData.responseText).find("z\\:row, row");
    if (result == undefined) {
        result = $(xData.responseXML).find("z\\:row, row");
    $(result).each(function(i, data) {
    //Magic   
Brandon James SharePoint Developer/Administrator

Similar Messages

  • Smart Folders - How do I set it to search one particular folder only?

    I want to set up a Smart Folder that will basically do the following:
    1: Look in folder called "Client Work".
    2: Find files modified in the last 1 week.
    That's it. Point 2 I can easily manage, but I can't figure out how on earth I am supposed to set the Smart Folder to only apply its searches to one particular folder on my hard drive? I really can't figure out which option under "Other..." I am supposed to be using.
    I'm sure there must be a simple solution though -- can someone please tell me what it is?
    Thanks!

    On the locations bar in the Finder Search window (where it says Servers Computer Home Others...) pick others and navigate to (with the + button), or drag the folder you want in the window and make sure it is the only folder selected. You will then have another button on the location bar Folder "Client Work". Select that button and save the search as a Smart Folder.

  • When I open one particular folder to play the games in it the pointer turns into a pinwheel and I cant open the game or close the folder unless I shut down my computer.  Never happened before and does not happen with any other folder on the desktop.

    why does pointer become a pinwheel when I open one particular folder only and prevent me from opening the apps in it and then keep me from closing the folder unless I shut down the computer completely.  I can open all other folders on the desk top without a problem.  My game folder never gave me trouble before.

    Try this. Open one of your files. The window that contains your picture is named at the top. Command click on the name and you'll see the entire path starting with its name and then moving to the folder, the folder it is contained in, etc all the way to down to the hard drive volume name. This should tell you where to find the folder.

  • Lightroom crashes when I try to access one particular folder

    Recently I've been renaming and reorganizing my image folders directly from Lightroom, instead of doing this in Mac finder or Bridge. Recently I renamed one particular folder that immediately caused lightroom to crash, and then keep crashing immediately after relaunching because it keep trying to load this folder in the library mode. Finally I decided to try and quickly select a different folder before it could crash, and this indeed worked. But it still crashes every time I try to view the contents of this folder. I tried deleting this folder from the catalog and then re-importing it, but after importing 10 or so images out of 500, it crashes agian. Could there be some corrupt file in this folder or what?

    I managed to get my Lightroom to a point were it crashes when I browse through certain folder.
    While testing possible solution for slow thumbnails problem I did the following:
    I shutdown Lightroom, renamed my preview folder, restarted Lightroom, rendered standard previews to folder X, browsed through those images few times, shutdown Lightroom again, removed new preview folder and renamed the old one back.
    Now, every time I browse through the folder X my Lightroom crashes at certain point. After brief testing there is no problems when I browse through other folders. Rendering standard previews to folder X did not help. I discarded all 1:1 preview from that folder I'm now rendering them again. Maybe that helps...
    Edit: Discarding and rendering 1:1 previews for all images in problematic folder removed my crashing problems.

  • Sharepoint 2010 custom search for subsites

    Sharepoint 2010
    Hello, i have main site and about 30 subsites. And on each subsite about 30 document librarys.
    I created basic search center custom site with name "Search". I also created custom scope. So when i search on my main site, anything is fine and when i go to subsite document library my scope is changed to this site:document librarys name. Then
    i pu something in search line and click search. On my custom search page i can see, that all links are from correct subsite and correct document library, but my scope shows "This Site:Search". So when i put something else in my search line and click
    search, i dont get any results, because it searches only on search page. Even when i click on scope dropdown, there is no choice, only "This Site:Search". 
    Is there any solution to create a search scope, that would take the parameters from the document librarys URL from wich i am searching for and put it in the scope.
    P.S.
    Default search OSSSearchResults.aspx works fine, but i nead to change xsl code.
    I tried to put scope dropdown to "show and default to url parametr", but nothing is changed.

    Hi Dmitri,
    If you want to search on a library, you can go to the library, then search using the Search Box at the top of the page. When you search, it will go to the OSSSearchResults.aspx page, and on the page, you will find there are two search scope, one is the library,
    another is the site. If you want to search on another library, you can go to another library, then search.
    Or, you can create a custom search scope pointed to the library, and add the search scope into the Search Dropdown display group.
    More infoemation, please refer to the link:
    http://www.bentedder.com/create-a-search-scope-for-a-sharepoint-2010-list-or-library/
    http://www.youtube.com/watch?v=9rt4hrMKs3o
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Sharepoint 2013 custom search results grouping display template

    Hi,
    I am trying to implement custom grouping for search result items. I would like to group them by a managed property, but without using result blocks (query rules). The idea is to sort the results by the property and then compare the current item (ctx.CurrentItem)
    with the previous item using ctx.CurrentItem.ParentTableReference. If a new property value is detected we insert a new 'group header' (just some simple html). The problem is the ParentTableReference is undefined. Shouldn't there be such a property in current
    item object?
    I'm implementing this in a custom search result item display template...
    Thanks in advance.

    Hi,
    According to your post, my understanding is that you want to customize search result items display template.
    I suggest you get enumerate all properties of JavaScript context object and debug you code to watch the
    ctx.CurrentItem object.
    The following articles for your reference:
    Debugging Display Templates in SharePoint 2013 Search
    http://powersearching.wordpress.com/2013/01/25/debugging-display-temlates-in-sharepoint-2013-search/
    Enumerate all properties of JavaScript context object in display templates in SharePoint 2013
    http://sadomovalex.blogspot.co.uk/2013/06/enumerate-all-properties-of-javascript.html
    How to Define a Custom Group Display Template (GroupTemplateId) for the Search Results WebPart via JavaScript
    http://www.eliostruyf.com/how-to-define-a-custom-group-display-template-for-the-search-results-webpart-via-javascript/
    Creating customized search results in SharePoint 2013
    http://www.abelsolutions.com/totm/creating-customized-search-results-in-sharepoint-2013/
    Best Regards
    Dennis Guo
    TechNet Community Support

  • SharePoint 2013 custom search Result Type for "Documents" not showing up as option

    I'm trying to create a custom search Result Type called "Documents" that will filter to MS Office filetypes and PDF's.
    However, when I perform a search, although many of these types of files show up in the results, I don't have "Documents" as a Result Type option.
    Here are the steps I'm following:
    From my Enterprise Search Center subsite: Site Settings > Manage Result Types.
    New Result Type.
    Name: Documents
    Source: Documents (System) - this out-of-the-box Result Source appears to cover the filetypes I need.
    Types of content: I've tried leaving it blank (to match all content) and specifically picking the types I want.
    What should these results look like? Office Document Item.
    Check Optimize for frequent use.
    Save.
    I then go back to my search center and search for a common keyword. Many in-scope file show up in the search results. However, under Result Type, I don't see "Documents," even if I click "SHOW MORE."
    Please advise.
    Thanks.
    Brad

    @Mikael As you say, to display the exact results when we click a result source, we should implement logic code to check whether item should be displayed. I have followed steps nearly the same as the topic owner but I saw nothing different between Everything
    and my custom Result Type.
    Here are the steps I'm following:
    Create a custom result type, named Job, and specify a custom display template for it.
    Set its condition to filter list items that have JobName site column ( JobName is site column's managed property) equal of any "IT" or "Doctor".
    I search for "Perter", it returns 5  items with Everything. I expect that it should return 3 items since only those items contain JobName site column.
    Search is fun but rather headache sometimes, give me advise please :)
    Thanks,
    Hoan.

  • Finder Search -- complex search in a particular folder

    This is embarrassing!
    I want to use Finder
         File-->Find
    to do complex searches (e.g. using "Kind", "Created Date", "Contents", etc.) on a specific folder.  I want to use the Finder "Find" GUI, not the Spotlight "command line".
    I think I need to discover how to add additional places, folders,  to the search location header of the Finder Search window, which now contains (by default?)
         Search:   This Mac    "My HD"
    In other words, if my target folder is called "Fum"  I think I need to see
         Search:   This Mac    "My HD"   "Fum"
    Then I need to select the right-most item to tell the Finder Search "just search the folder named 'Fum'".  After that, I enter the search parameters.
    But I cannot figure out how to do this.    I tried drag-and-dropping folder "Fum" on this line.  I tried Command-F with "Fum" selected. I tried enabling the left tool-bar, getting "Fum" in the list, then  highlighting "Fum".   
    D'oh!   It's such a stupid question that ... the obvious web searches are useless.
    So... how  is this done?
    I feel like I'm totally missing some basic assumpation of the current 10.7 Finder search metaphor.  Please feel free to fill me in.   (Why isn't there a "+" button at the far right of the Search locations header, instead of what I see now, only a "Save" and a "-" button?  That would seem the logical way to add locations to search.)
    TIA

    Whew, sorry...
    [A tedious description of various experiments, failing attempts to sort this problem omitted here.]
    I note that Finder Preferences ---> Advanced offers 3 choices for searches, schematically:
         When performing a search:
          (1) Search This Mac
          (2) Search the Current Folder
          (3) Use the Previous Search Scope
    [Another tedious description of more experiments omitted here.]
    Just a moment... Selecting alternative (3) does the trick for me!   I can now restrict the search directory to "Fum".  I just need to:
    a)  Choose Finder search preference (3), which to my mind implements "Search the Current Folder" and NOT "Use the Previous Search Scope". 
    b) Interpret "Current Folder" as the folder open and at front.
    Life is now good!   <heavy sigh>

  • Set custom colors for ONE particular window

    Hi, I often need to compare two files, say a "good, or sample" one, with a "bad, or in preparation".
    They both have the same name (like web.config CV.docx, MyClass.cs), so when I visualize them, I cannot distinguish easily whioch is which.
    For example, I see two notepad instances displaying "web.config" in title bar, which is which?
    Of course I could rename them, but I only want to view, not to modify anything, as that could be dangerous (oops! renamed wrong web.config)
    I tried to create two users "bluethemeuser" and "greenthemeuser", then shift run as different user, but this is tedious, and does not work (does not honor other user settings).
    I am loking for a way to tell a window "now you have a blue background until you are closed"
    any idea?

    Having a tag or a post-it, or even a spider ;-) in the window would be just as good.
    In IE you can use the Developer Tools to change the Title, which would change the Tab label.  F12, Ctrl-2,  document.Title="Demo"   In IE11 we even have IntelliSense to reduce the amount of keystrokes.
    Coincidentally I recently discovered a tool on the Windows SDK called
    Inspect.exe.  If you could find a way of extending that perhaps you could give any window any title you wanted?  Or add notes to hidden fields?
    Heh.  For my Demo tab.  Inspect says there could be Other Props:  I wonder how?
    Robert Aldwinckle

  • Getting wrong information when trying to access one particular websitewebsite access

    I have a problem when carrying out a search on ONE particular website. I have contacted the company (John Lewis plc) who inform me that they do not have any roblems with their site . This problem started a month ago when I kept getting a message saying 'Due to a technical problem the page you requested cannot be displayed'. I have deleted the site from my Bookmarks and re-added but to no avail. I can now access the main page of the site but when I try to search for a product it just keeps telling me 'Due to a technical problem the page you requested cannot be displayed'. As I previously said, it only happens on this website but, having checked witheir Customer Support Team, they have confirmed that no one else has complaine of this problem and they are not aware of any problems with their site. Can anyone suggest a cure please?>

    Thank you for your response but after trying everything else I deleted both my registration and password on this site and re-registered. This seems to have cleared the problem.

  • How to use Custom Search in Dynamic Page or HTML Portlet ?

    Gurus,
    1. I have a tab called My Space in the portal web site, where user gets a personalized view of the content.
    2. I am using custom attributes and custom item types. I have a custom attribute called 'Location', which is a attribute of custom item types.
    3. I have 2 pages - News and Events.
    4. All the content in News and Events page is tagged by the attribute 'Location'.
    5. The requirement is to let the user search the News and Events by Location.
    6. To achieve this I used the Custom Search portlet and the user can select the attribute Location and see the resultant News and Event items by location in the Search portlet.
    7. The requirement is to present the News items and Event items in separate regions on the page and show only the first 5 News and Event items in the result and show a More link which would guide the user to rest of the News and Event items.
    8. Eventually there may be more content other than News and Events tagged by location. If so, the requirement is to create a new region and display the new content.
    9. How would I do this using custom search ? I was thinking if there is anyway I could use the custom search api (where can i find it ?) in the HTML portlet or Dynamic page and submit the result to IFRAMES in each region and show the output ?
    Pls advise.
    Thanx a bunch.

    I would suggest that you use two custom search portlets; one for the news items and one for the events items. Switch the custom search portlets to "AutoQuery" mode and add the relevant criteria. On the results display tab of the the "edit defaults" screen, choose to show just 5 items.
    To add a link to show the user mode results, I'd create two new pages that have just a single custom search portlet on it that is customised to show more of the results and maybe has the pagination links enabled.
    Then I'd add two "Page Link" items underneath the two news and events portlets on the first page in an item region.
    I'm sure there are other ways of doing this as well. Hope that helps to get you started.

  • How to run a search query for a particular folder in KM related to portal

    Hi,
    Can any one tell me the steps for : how to run a search query for a particular folder in knowledge management related to portal.
    Answers will be rewarded.
    Thanks in advance.
    KN
    Edited by: KN on Mar 18, 2008 6:33 AM

    Ok u may not require a coding
    But u req configuration
    U should first make a search option set
    Link: [Search Option set|http://help.sap.com/saphelp_nw04/helpdata/en/cc/f4e77ddef1244380b06fee5f8b892a/frameset.htm]
    Then u need 2 duplicate a KM Command by the name Search From here
    and customize it to include the Search Option that u have created
    Link: [Search from here|http://help.sap.com/saphelp_nw04/helpdata/en/2a/4ff640365d8566e10000000a1550b0/frameset.htm]
    Then in the layout add this command.
    Regards
    BP

  • To search only images in a particular folder of picture library using content search webpart.

    I have Images library where i am storing images in different folders.I need my content search webpart to search and display images in a particular folder in Images Library.For ex: i need to if my Picture Library Name is 'Images' a folder inside that is
    'Travel' which is having some images.I need my content search webpart to pick images from 'Travel' folder only.Any pointers to this will be helpful.

    Hi,
    According to your post, my understanding is that you want to search images in a particular folder via content search web part.
    When we use the search crawl the items in the images library, it crawls the items and folder with the following URL.
    For folder: http://sp13/PublishingImages/Folder1.
    For Items:
    http://sp13/PublishingImages/Forms/DispForm.aspx?ID=itemID
    It not crawls the items as the path
    http://sp13/PublishingImages/Folder1/Item, then we could not use this path to retrieve the items in the folder.
    As a workaround, we can create a custom field in the image library, such as a choice type field named
    Folders(it contains the folder names), when we create a image, we set the folder name in this field.
    Note: we should new a managed property manually to match the Crawled property.
    Then we can use this field to filter the items in a particular folder as below, it works like a charm in  my environment.
    path:"http://sp13/PublishingImages"   Folders=Folder1
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Display list of sales orders for one particular customer using BAPI in WD

    Friends,
    i want to display list of sales orders for one particular customer, the materials ordered, quantity ordered, goods issue date of that particular order and contact information about that particular customer, using Webdynpro.
    Please somebody send me related info,blogs,help links , to complete this task, this is very urgent.
    Please help
    Peter

    Find the WD tutorials here...
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/web%20dynpro%20sample%20applications%20and%20tutorials.htm">Tutorials</a>

  • When I am searching for any particular song or album from my shared ITUNES folder, the search is conducted  in the apple store and not on the shared library. How to search for the song in the shared library

    I am using IPAD Mini.When I am searching for any particular song or album from my shared ITUNES folder, the search is conducted  in the apple store and not on the shared library. How to search for the song in the shared library

    Search for shared library is impossible, as far as I know.  Searches supported - are local and internet.

Maybe you are looking for

  • Ideapad U110 - External DVD Player not working with Windows 7

    I did a windows 7 upgrade on my U110 and now the external DVD drive will not function. The computer recognizes that a DVD driver is plugged in (in an explorer folder) but Windows 7 doesn't register the DVD when I plug it in and the computer cannot re

  • How to disable and enable Check box based upon condition

    Hi, I wants to disable/hide the check box field before the required field is filled.   Kindly help me

  • Adobe taking over my computer

    Hello, I have to have Adobe in order to apply for jobs in my area. I do not like using it, but had to update to the 9.0 so I could post my resume and other documents. The problem is that I can't open any of my word documents because the Adobe interfe

  • How can I create a horizontal scrollbar with a centered thumb that scrolls content from both sides?

    I am having trouble figuring out how to create a horizontal scrollbar component either by itself or nested inside a data list component that will have it's thumb centered in the track when running and reveal content from either the right or left side

  • KERN-EXEC ERRON IN MY NOKIA 9500

    I JUST RECENTLY BOUGHT NEW NOKIA 9500. I LOVE THIS MOBILE TO USE. BUT I GOT VEY BIG PROBLEMS IN MY COMUNICATOR. I AM NOT ABLE TO CALL ANY ONE FROM MY CONTECT LIST FROM OUT SIDE OF THE PHONE. AND ALSO NOT ABLE TO CHECK MISSED CALL, RECENT CALL, AND DI