Search for one specific document? - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Search for one specific document?

Last post 02-07-2006 11:26 PM by Patrick Halstead. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 02-01-2006 01:52 AM

    • Razor
    • Not Ranked
    • Joined on 02-01-2006
    • Posts 16

    Search for one specific document?

    Hi, From an InfoPath form I'm trying to use the SharePoint 'built-in' List Data Retrieval web service to read one data source in a specific document in a doc library. I know the name of the document (something.xml) and the name and path of the data source I'd like to read.

    I've tried to use the Data Connection Wizard in InfoPath to recieve the data to a text box but for the List Data Retrieval Query method there seam to be such a wealth of parameters to provide that I get lost. Anyone like to share some knowledge about this?

    Best regards Lars
  • 02-02-2006 06:22 PM In reply to

    Re: Search for one specific document?

    Hi Lars amd welcome to our forum,
    I believe Matt Faus will post a HowTo related to querying values in SharePoint soon. He'll probably be able to point you in the right direction. Also, chapter 9 in our book is a good resource.
  • 02-02-2006 06:38 PM In reply to

    Re: Search for one specific document?

    I'm not quite sure what you're trying to do here. Are you trying to get items from a column in a SharePoint List or are you trying to access data held within an XML document that is in a SharePoint Form Library?

    If you are trying to get information from a SharePoint list you can use the Data Connection wizard to get that rather easy, try this:

    1. Choose Data Connections from the Tools menu.
    2. Click Add.
    3. Select Receive Data, and then click Next.
    4. Select SharePoint Library or List, and then click Next.
    5. Select your SharePoint List from the lists of choices, and then click next.
    6. Select each of the columns that you would like to get information from, and then click Next.
    7. Click OK.

    If you are trying to get data held within a list inside of a document (which I think is what you are trying to do) you will have to promote this node to SharePoint when you publish the form. Then, after you have done this, you can follow the steps above (choosing the library instead of the list) and get the information.

    To promote your fields to SharePoint, follow these steps:

    1. Choose Publish from the File Menu, click Next.
    2. Select SharePoint Form Library, and then click Next.
    3. Select Create a new SharePoint Form Libarary, and then click Next.
    4. Type the URL of your SharePoint site, and then click Next.
    5. Type a name for your library, and then click Next.
    6. Click the Add button to add nodes that you would like to make available as SharePoint column names.
    7. Click Finish.

    I hope this helps, if this wasn't quite what you were trying to accomplish, please provide a little more detail.

    ---------------
    Matt Faus
    InfoPath Dev Texas
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 02-03-2006 06:25 AM In reply to

    • Razor
    • Not Ranked
    • Joined on 02-01-2006
    • Posts 16

    Re: Search for one specific document?

    My form is published in a SharePoint Form Library. What I'm trying to do from this form is to access data held within an XML document in another form library on the same site.

    I.E. From my form in form library 'A' I want to search for document '12345.xml' (the user selects the name from a drop-down) in form library 'B' and then read data from one column in this form if it is found.

    Sorry for being a bit unclear. I'm not too familiar with SharePoint.

    /Lars
  • 02-03-2006 02:30 PM In reply to

    Re: Search for one specific document?

    Hi Lars

    You want to bind a dropdown to a sharepoint list of xml documents and show an element/attribute value in that chosen xml document in a textbox.

    Have i understod this correctly?

    What you are trying to achieve is not quite simple, and would as i see it require some managed code or scripting to work.

    First off: the standard SharepointListAdapter DataObject as far as i know only supplies you with the meta data of the list items, and not the document itself (here the xml file) [somebody correct me if im wrong].

    You *could* use the SharepointListAdapter for mapping meta data for the drop down ("title" for display and "id" for value) and in the event code hook up to the GetListItems webmethod of the Lists webservice:
    http://yourPortal/yourSubAreaOrSite/_vti_bin/lists.asmx?op=GetListItems

    With this webservice you could send a query (check the CAML syntax in the SPPT/WSS SDK) that would retrieve the XML document that matches the selected ID in the dropdown box as a binary array, parse this as an XML document and select the node/element/attribute you would like to display elsewhere in the document.

    As you have probably seen by now, that you want to achieve isnt as simple as it sounds. It can be done though, so if you are familiar with C# or javascript it shouldnt be too complicated to code.

    hope the above was understandable, else ill elaborate in further detail.

    //AndersR
  • 02-06-2006 05:30 AM In reply to

    • Razor
    • Not Ranked
    • Joined on 02-01-2006
    • Posts 16

    Re: Search for one specific document?

    AndersR, you have understood perfectly. I would love to see a more detailed description of your solution.

    We are currently using VB .NET so if you can provide some code in this language it would be greate.

    /Lars
  • 02-07-2006 12:44 PM In reply to

    Re: Search for one specific document?

    Hi Lars,

    its time for you to grab the keyboard and start coding ;-)

    I just answered another guy about GetListItems here
    http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=1664#5065

    Its C# but it should get you started anyhow.

    Also check the links in the same posting to MSDN. The first thing you wanna do is grab the SPPT SDK as a winhelp file for reference.

    hth
    //AndersR

    //AndersR
  • 02-07-2006 11:26 PM In reply to

    Re: Search for one specific document?

    Anders, great response! 30 more posts and you are a moderator... :)

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (8 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.