How to get specific folder and items in the document library sharepoint 2010

I have a Shared library and it has Test folder and inside so many documents now i need to display the Test folder and items programmatically.
Appreciate Help!!!!!
Blitz

This is how you could do it using the server object model -
SPWeb site = SPContext.Current.Web;
SPList list = site.Lists["listname"];
SPQuery query = new SPQuery();
SPFolder folder = list.RootFolder.SubFolders["FolderName"];
query.Folder = folder;
SPListItemCollection items = list.GetItems(query);
foreach (SPListItem item in items)
//do whatever you want here
Please "Mark as Answer" if a post has answered your question or "Vote as Helpful" if it was helpful in some way. Here's
why

Similar Messages

  • Moving documents with a workflow from a document library to a folder and back to the document library

    Hello all,
    I have created a document library with a folder inside of it.
    By means of a workflow, I could move a document that was in the document library to the folder using the action “update path and name”. Now I need to do the reverse path, that is, using a workflow I’d like to
    move the document that is now in the folder, back to the document library but I can´t find the action “update path and name”. Do you have any ideas on how to solve this?
    Thanks a lot!
    Regards.

    Hi Juan,
    For your issue, you can consider the actions as below:
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • How to get customer number and name from the SD document

    Hi All,
    Can you please let me know how to get Customer Number and Name from the SD Document?
    Thanks a lot....
    Anil

    Hi,
    It will be displayed in the SD (BIlling document) itself,  you clikc on the VF03. The customer name and number will also appear in the SO document also Tcode VA03
    regards,
    radhika
    Edited by: kolipara radhika on Jul 10, 2009 5:32 AM

  • Does anyone know how to get specific date and time on an itouch

    I need secific times on  safari searches in my history, there is a legal implication and I need to know if its possible to get the info, or can an apple store get anything. the history is in there but it just gives the date not time.
    Thanks in advance

    a) Open the document with it's password.
    b) Pick "Duplicate" from the File Menu
    c) Pick "Save As..." from the File Menu.

  • Conflict between Client object model and Item Updated Event Receiver in sharepoint 2010

    Hello All,
    As per my requirement I have a two custom list.
    Agent Details
    Port Name
    Agent Details contains Agent code, Port Name,  email, address and phone of Agent. Its possible that one Agent Code is connected with multiple Port Name.
    Basically what I am doing is I am getting port name connected with Agent code, using jquery and bind those values with check box(using javascript created dynamically) and bind all with Div tag.
    Now when my custom edit form of Agent list open up it shows me different port name binding with checkbox group.
    when user select the check box and click confirm button my clicent object model script will run and add this selected value into Port Name list. 
    After confirm one more button named Save will enable asking user to edit the email, phone or address value and when I click on save my Item updated event fires which update the values of the selected port name(These port name I am getting from port
    name list) to Agent Details custom list.
    Now when I am trying to update the values my event receiver fires or some times it got stuck(not firing). So could you please help me the possible alternative for this requirements.
    Can we user the Ecma Script(Client object model to preserve the value of selectec port) and Item updated event receiver on the same time?
    Is anything am doing wrong then please guide me.

    Hi,
    As I understand, when you updated values in the agent details list the Item updated event receiver got stuck sometimes.
    The item update event receiver will fire after the item has been saved, and the client object model script or the Ecma Script runs before the item is saved, so there is no conflict between the client object model script and item update event receiver.
    You could find out the reason about the item update event receiver gets stuck by debugging the event receiver.
    When you want to debug your event receivers, you have to attach to OWSTIMER.EXE and wait till they are executed. You can control this behavior using the Synchronization attribute. Also, if you’re looking for an easy way to debug an event receiver without
    having to manually attach a debugger to your code, you can use the System.Diagnostics.Debugger.Launch() method.
    The articles below are about how to debug in the event receiver in SharePoint 2010.
    http://sharepoint-kings.blogspot.jp/2013/02/debugging-event-receivers-in-sharepoint.html
    http://chakkaradeep.com/index.php/event-receivers-in-sharepoint-2010/
    http://sharesaint.com/?p=77
    Best regards,
    Sara Fan
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to call out of box delete function on client side for deleting item in document library SharePoint 2010.

    Hi,
    We want to add the custom functionality to delete the item in document library .
    if we click on custom button it should delete the item in document library.
    Could anyone please suggest me.
    How to accomplish the task.
    Thanks ... 

    Hi,
    Any update?
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How multiple users can open and update it same time in Sharepoint 2010, excel file

    we are using SharePoint 2010, multiple users can open and update the file at same time in SharePoint, I have searched a lot and
    read it, some suggestions were can create the file as share work book and then save on Share point and other were its supported only with Office web Apps, Excel Web App, we don't have office Web apps or excel web app, is there any other suggestion,
    any help will be great, thanks in advance

    Hi,
    You need office web apps for co-authoring, see Software version requirements for co-authoring in SharePoint 2013 and SharePoint Online section in below link -
    http://technet.microsoft.com/en-us/library/ff718249(v=office.15).aspx
    and
    http://office.microsoft.com/en-us/sharepoint-foundation-help/document-collaboration-and-co-authoring-HA102772333.aspx
    Edit: Link for SP 2010
    http://technet.microsoft.com/en-us/library/ff718249(v=office.14).aspx
    Hope this helps!
    Ram - SharePoint Architect
    Blog - SharePointDeveloper.in
    Please vote or mark your question answered, if my reply helps you

  • Content Search and not the document in SharePoint 2010

    Hi,
    The requirement is : Search the content of documents by storing the data in a database-driven structure and get the search results in a grid view with data in different columns. My questions are :-
    1) Can we store complete content of the word document in a separate database (other than content DB of site collection) or in list/library and show in search results/SP search result page ?
    2) Can we convert the existing documents in XML format and save it SharePoint ? Will that content be visible in Search results  ?
    3) How can we modify search page to have check box before every search result ?
    4) How can we export the selected search results in an excel file ?
    Any help will be highly appreciated !!!
    Vipul Jain

    Hi Inderjeet,
    Thanks for the reply. But the client's existing documents are in .doc (Word 2003) format , which is not an open-xml supported format. So the first step would be -
    Q1) How can we extract the content from word documents ?
    The existing documents are based on a standard corporate template (.dot). These documents are having very heavy content , for example, resume document of an employee, having 20 experiences in very big paragraphs in text format.
    Q2) Can we store such large content (experience/qualifications/professional licenses etc) in SharePoint list/library columns ? If yes , which column type will be used...  
    Its true that we can convert the existing documents in XML and then the content will be searchable in SharePoint 2010.
    Q3) Can we customize the search page to that level that it can give us results in a grid view having different columns , and user can select the multiple search results and create a document dynamically based on those selected search results.
    I Know anything can be done using customization's (.net C#)..I just want to clarify for SharePoint search page. If yes , then there will be no need to store the document contents in a separate SQL database.
    Kindly reply.
    Vipul Jain

  • How do I disable Check out dialog when opening Documents from SharePoint 2010

    Hi
    When I open a pdf document form a SharePoint Server 2010 in the client application (Adobe Reader X) I'm always promted to check out the document to be able to edit it. However in most cases I just want to view the document and the promt is a hinderance for most of the users. I can think of two possible solutions but I can get either of them done:
    1. Disable the check out promt in Acrobad Reader
    2. Make sure documents are always opened in the Browser (not in client application)
    We configured everything right form the SharePoint point of view. What do I need to configure to achive either of the above things in Acrobat Reader?
    Lucas

    I'm still looking for an answer to this post. Any ideas?

  • Does anyone know a way to programatically loop through the items in the document library

    A lot of the funcations like deleteSymbol and updateSymbol depend on which items are "selected" in the library panel.
    Is there a way to programatically access these selections?
    or
    Loop through the library?
    or
    Set selections?

    Yup, I've asked for an API to access the selection in those panels for years, to no avail.
    Note that you can loop through layers, frames and pages, but you can't tell what the user has selected in the actual panel UI.  Also, you can't find out which symbols are currently used in the document.  Nor can you programmatically insert a rich symbol into the document and have it maintain its "richness".

  • How to get index of an item in the DropDownByKey control?

    Hi,
    I'm new to PDK for .NET and I have a simple question about the "IndexOf" method of the items collection.
    Attached a small test program:
    Dim li As New DropDownListItem
    li.Key = "A"
    li.Text = "Zero"
    DropDownByKey1.Items.Add(li)
    li = New DropDownListItem
    li.Key = "B"
    li.Text = "One"
    DropDownByKey1.Items.Add(li)
    li = New DropDownListItem
    li.Key = "C"
    li.Text = "Two"
    DropDownByKey1.Items.Add(li)
    li = New DropDownListItem
    li.Key = "D"
    li.Text = "Three"
    DropDownByKey1.Items.Add(li)
    li = New DropDownListItem
    li.Key = "E"
    li.Text = "Four"
    DropDownByKey1.Items.Add(li)
    Dim liForSearch As New DropDownListItem
    liForSearch.Key = "C"
    liForSearch.Text= "Two"
    Write(" Index --> " & DropDownByKey1.Items.IndexOf(liForSearch))
    The output should be 2 but instead I get -1 (Not Found).
    Why?
    thanks,
    Omri

    Hi,
    Since you have the Key of the listItem you are looking for you should get the item by applying:
    liToSearch = DropDownListItem.Items[key];
    int index = DropDownListItem.Items.IndexOf(liToSearch);
    Regards,
    Tsachi

  • I've had a recent issue with downloading songs from the store, and they won't show up in my iTunes library, only in my purchased playlist. Anyone know how to get recent purchases to show in the music library?

    Am i the only one with this issue?

    when you play the CD in your laptop on your home screen a Cd should pop up under the name of the album. Than when you open itunes it will probly say something like "let this CD download" or something like that. If it doesn't than automaticlly while the CD is importing to your itunes a page will pop up with a progess of the CD download.
    Hope that helped.

  • How to disable check in/check out in a document library?

    We have a library but would want to use it as regular network folder. Users don't want to see the check in/check out option. Is there a way to disable that? thanks in advance.

    If you want to disable both check in/ check out context menu items in the document library then see the following link which describes how to add custom menu items to a document library via a hidden "content editor web part". Add that to your web part page and add the following to the "source editor"
    <script language="javascript">
    function AddCheckinCheckoutMenuItem(m, ctx, url)
    {return;}
    </script>
    This will override the core.js function which adds these items to the context menu.
    http://blogs.msdn.com/bowerm/articles/175691.aspx
    http://www.certdev.com

  • How to Get Choices as a Dropdown from a different Column for the same Item In a Document Library?

    Hello All,
    I was trying to see if there is any way that we can get the choices for a Field from another filed in the same item in a Document Library.
    To be specific.
    I have Created a Project Document Set, Which has a Column called "Project Members" where all the members will be listed. This will be inherited to all the documents in that Project Document Set. This is used to grant Permission using Workflow.
    I also have "Document Members" Column(This is only for Documents) who will be given Edit permissions to that Document using a Workflow. This can be any type of column(choice, People or Group etc) As long as I can select multiple values.
    I am looking for a way to get the "Project Members"(Values or Users) as choices for "Document Members". I know this is possible in the List as you can customize in the InfoPath Form. But not sure in the Document Library.
    Document Members can only be the members from the Project Members, In order to grant granular Permissions for the project And Documents using a Workflow
    Document Library
    Project Document Set Name
    File Name
    Project Members
    Document Members
    Project A
    User1;User2;User3
    Doc1
    User1;User2;User4
    User1;
    Doc2
    User1;User2;User5
    User1;User2;
    Doc3
    User1;User2;User6
    User1;User2;User3;
    Project B
    User5;User6;User7;
    Doc1
    User5;User6;User7;
    User7;User5
    Doc2
    User5;User6;User7;
    User7;User5
    Doc3
    User5;User6;User7;
    User5;User6;User7;
    Thanks for your time.

    >
    Jenny Karunakaran wrote:
    > Hi Jung,
    >
    > Thanks for the reply. But I dont know how to assign value set to this attribute(i.e. Context atribute to which filter value property is bound). Can I use a supply function for this ?
    >
    >
    > Regards,
    > Jenny
    No. A value set and a supply function are two completely different things. You use this Context API to populate the value set for an attribute:
    IF_WD_CONTEXT_NODE_INFO=>SET_ATTRIBUTE_VALUE_SET
    Value Sets are also how ByKey UI elements (like the DropDownByKey) are built.  Here is a help document that discusses value sets - but in the context of the ByKey UI elements.  The process is the same for creating the value set however:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/bb/69b441b0133531e10000000a155106/frameset.htm

  • How to count files in a folder and subfolders of the folder.

    Hello everyone,
    I'm having a difficulty with countin files in a Regular folder and subfolders of the folder. I've tried to use SI_ANCESTOR  in a query; however, it gives me innacurate results.
    I used this hierarchy to create the code below, and it works to count all the files:
    Folder A ---> Folder B( subFolder of A)  -
    > Folder C(subFolder of B)  
    //get folder A
    IInfoObjects regFolders = infoStore.query ("SELECT * FROM CI_INFOOBJECTS WHERE SI_KIND='Folder' AND SI_PARENTID=0 AND SI_NAME!='User Folders' Order by SI_NAME");
    IFolder regFolder = (IFolder) regFolders.get(0);     
    //get files from Folder A     
    IInfoObjects rFiles = infoStore.query ("SELECT * FROM CI_INFOOBJECTS WHERE SI_PROGID !   = 'CrystalEnterprise.Folder'   AND SI_PARENTID=" + regFolder.getID() );
    ilesCount += rFiles.size();
    int subCntr=0;
    nt subCntr2=0;
      //get folder B      
    IInfoObjects rSubFolders = infoStore.query ("SELECT * FROM CI_INFOOBJECTS WHERE SI_PROGID = 'CrystalEnterprise.Folder' AND SI_PARENTID=" + regFolder.getID() );
    //get files from subFolders of Folder A
    while (subCntr < rSubFolders.size())
              IInfoObject subFolder=(IInfoObject)rSubFolders.get(subCntr);
              IInfoObjects subFiles = infoStore.query ("SELECT * FROM CI_INFOOBJECTS "
          + " WHERE SI_PROGID != 'CrystalEnterprise.Folder'" AND SI_PARENTID=" + subFolder.getID() );
             filesCount += subFiles.size();
             //get subFolders of Folder B                   
             IInfoObjects rSubFolders2 = infoStore.query ("SELECT * FROM CI_INFOOBJECTS WHERE SI_PROGID = 'CrystalEnterprise.Folder' AND SI_PARENTID=" + subFolder.getID() );
                         //get files from subFolders of Folder B
         while (subCntr2 < rSubFolders2.size())
              IInfoObject subFolder2=(IInfoObject)rSubFolders2.get(subCntr2);
              IInfoObjects subFiles2 = infoStore.query ("SELECT * FROM CI_INFOOBJECTS "
                   + " WHERE SI_PROGID != 'CrystalEnterprise.Folder'  AND SI_PARENTID=" + subFolder2.getID() );
                                               filesCount += subFiles2.size();
               subCntr2++;
              subCntr++;
    As you can see, the code is too complicated, and what if folder C has subFolder?
    I'm guessin maybe recursion would be one way to got, but I'm not really good with it, so I was wondering if anyone has any idea on how to go about doing it.
    Thank you,

    Hi,
    For detailed information, please refer to the BI 4.0 developers guide here.
    You can find the section "Setting up the development environment" in developers guide that have every single instruction to execute a java code specific to BI 4.0 environment.
    Also, here are the instructions for BO 3.1 environment:
    To configure a WAR file for a J2EE application that uses the BusinessObjects Enterprise XI 3.0 and 3.1 Java SDK, complete these steps:
    Create a lib folder in the WAR file's WEB-INF folder.
    Copy the Enterprise XI 3.0 or 3.1 Java SDK JAR files from the appropriate location below to the WAR file's WEB-INF\lib folder:
    Windows:
    ...\Program Files\Business Objects\common\4.0\java\lib
    UNIX:
    <businessobjects_root>/java/lib
    Copy the log4j.jar file from the appropriate location below to the WAR file's WEB-INF\lib folder:
    Windows:
    ...\Program Files\Business Objects\common\4.0\java\lib\external
    UNIX:
    <businessobjects_root>/java/lib/external
    Copy the entire crystalreportviewers12 folder from the appropriate location below to the WAR file's root folder.
    Windows:
    ...\Program Files\Business Objects\common\4.0
    UNIX:
    <businessobjects_root>/enterprise12/JavaSDK
    Open the web.xml file located in the WAR file's WEB-INF folder.
    Specify the location of the utility files used by the report viewers contained in the crystalreportviewers12 folder by inserting the following code below the <display-name> and <description> tags but within the <webapp> tag definition:
    <context-param>
    <param-name>crystal_image_uri</param-name>
    <param-value>/BOXIR3/crystalreportviewers12</param-value>
    </context-param>
    <servlet>
    <servlet-name>CrystalReportViewerServlet</servlet-name>
    <servlet-class>com.crystaldecisions.report.web.viewer.CrystalReportViewerServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>CrystalReportViewerServlet</servlet-name>
    <url-pattern>/CrystalReportViewerHandler</url-pattern>
    </servlet-mapping>
    Deploy the WAR file to the J2EE application server.
    You are now able to run an application using the BusinessObjects Enterprise XI 3.0 and 3.1 Java SDK on a J2EE web application server.
    Hope it helps.
    Regards,
    Anchal

Maybe you are looking for

  • How to print Text for more than 255 characters.

    Actually I am writing dynamic sql in which some text is assigned to some variables and then contacating tohse variables to create one complete SQL. So the text into that variable is more than 25 chars, which i want to print to check wether the sql ge

  • Business Scenario for a Particular Product

    Hi All, We have an item that we produce for a particular size say AxBxC. Here B and C are standard but A varies on the requirement of the customer.. Now how do I maintain these items? Say, do i have to create an item every time i get an order from th

  • Hide user picture in iPad mail client

    Hi all, I apologize in advance if this is a really simple question, but it's been getting on my nerves a whole lot lately. I must have configured my email ages ago to come with a user picture, and now I'd love to find a way to remove it. I just find

  • How to hide a rectangle graphic in a canvas ?

    Hi all, As we know we can draw rectangles from the tool pallette on a canvas. And I want to hide this rectangle under condition in my forms application. How can I achieve this ? Thank you very much indeed.

  • Yoga 13 Recovery woes

    Hello, board. I wanted to make more space on my small SDD so I followed the Lenovo guide on backing up the recovery to an external drive. Once I was done I formatted the drive and installed Windows 8 fresh and continued to install all the drivers fro