Pass Document Library Id To Form - InfoPath Dev
in

InfoPath Dev

Pass Document Library Id To Form

Last post 12-26-2006 11:12 PM by ekzarov. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 12-21-2006 02:53 AM

    Pass Document Library Id To Form

    I have a form, wich set as a template for several document libraries...
    When I create new item in one of this libraries, I want to know from wich I`ve Done it...
    How can I pass Document Library ID into my Form ??? Any bado knows???
    Best regards,
    Alexander Ekzarov
    Kyiv, Ukraine
    silverlightnet.blogspot.com
  • 12-21-2006 10:58 PM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: Pass Document Library Id To Form

    Hi Ekzarov Welcome to the Forums,

    By using below line of code you can get the complete url of the form where the form is opened and from which document library it is opened. Using this document library ID library value you can pass to your form.

    var url = XDocument.Solution.URI;
  • 12-22-2006 12:33 AM In reply to

    Re: Pass Document Library Id To Form

    Yes, but how do I pass this param ???
    and where this code "var url = XDocument.Solution.URI;" I should write???
    As I now, when I set a handler to document library I can handle some event after I submit data (apply changes), but I need to pass param into some field, for example "myLibId" when form shows...
    I am sorry, if my questions is too stupid, but I am novice in this area :(
    Best regards,
    Alexander Ekzarov
    Kyiv, Ukraine
    silverlightnet.blogspot.com
  • 12-26-2006 03:47 AM In reply to

    Re: Pass Document Library Id To Form

    Does anybody knows, how to do this ??? Please, help...
    Best regards,
    Alexander Ekzarov
    Kyiv, Ukraine
    silverlightnet.blogspot.com
  • 12-26-2006 04:25 PM In reply to

    Re: Pass Document Library Id To Form

    Have you looked at what is contained in the XDocument.Solution.URI variable? I haven't done this myself, but I believe you should be able to extract the information you are looking for from this variable. You might have to do some substring manipulations, but it should be there.

    Depending on what you're doing with this information, you will probably want to perform these operations in OnLoad and then set a node or global variable t othe ID.
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 12-26-2006 11:12 PM In reply to

    Re: Pass Document Library Id To Form

    Solution.URI is just an adress wich contains the name of library. But I need to get GUID of Sharepoint Library...
    I can`t believe that I need to get from URI the name of the library and then with some web-service search for my library by this name and get GUID...

    P.S. My library is not a web-part, but Sharepoint default library...
    Best regards,
    Alexander Ekzarov
    Kyiv, Ukraine
    silverlightnet.blogspot.com
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.