Pass params via URL to InfoPath webform - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Pass params via URL to InfoPath webform

Last post 02-12-2007 02:45 AM by happydigit. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 02-07-2007 09:58 AM

    Pass params via URL to InfoPath webform

    Hello,

    here is my problem:

    I have created a aspx page in SharePoint Designer. On this page I put with the XmlFormView Control a web browser enabled InfoPath 2007 form. Works fine. Now I want to pass two params via the URL to the InfoPath form.

    For example: The URL to the aspx page with the form is:

    myserver/site/infopathpage.aspx

    Imagine I have this URL:

    myserver/site/infopathpage.aspx?listid={xxx}&itemid=26

    How can I use this params (listid and itemid) in InfoPath from the URL string?
  • 02-10-2007 04:31 PM In reply to

    Re: Pass params via URL to InfoPath webform

    I don't know if this is supported. My guess is that it isn't for hosted InfoPath forms. If you have a handle to the InfoPath instance, you could write a Web service on the server to get the parameters and set a couple fields in the InfoPath form. Usually for passing parameters we use import via the command line /aggregate switch or we use a sample xml file and NewFromSolutionWithData or something like that. I'll ask David to respond. He worked on Form Server...
    Patrick Halstead
    Project Manager at Qdabra
  • 02-11-2007 04:29 AM In reply to

    Re: Pass params via URL to InfoPath webform

    Thanks Patrick!

    Meantime I do the following workaround:
    In the InfoPath object model I can get via the HTTPContext the referrer URL. With some ”epic voyage” in string operations (substring, trim, etc.) I deconstruct the URL and so I get my parameters in InfoPath but I think this is only a workaround. And it is very error-prone.
    Actually I miss in InfoPath “request.params” :-)
  • 02-11-2007 12:48 PM In reply to

    Re: Pass params via URL to InfoPath webform

    Hi HappyDigit,
    Can you post more details of what you did? We'd like to understand this better. Thanks!
    Patrick Halstead
    Project Manager at Qdabra
  • 02-11-2007 08:07 PM In reply to

    Re: Pass params via URL to InfoPath webform

    Did you have a chance to read this article:http://msdn2.microsoft.com/en-us/library/ms778201.aspx ?
    It describes in detail how to deploy and use the XmlFormView control (using VS).
    Search for "Getting a Value from the Web Page to the Form" in that article and that should get you going.

    Also worth checking out:http://blogs.msdn.com/infopath/archive/2006/10/21/hosting-infopath-forms-in-a-custom-aspx-page.aspx
    David Airapetyan / Software Services Architect
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 02-12-2007 02:45 AM In reply to

    Re: Pass params via URL to InfoPath webform

    Hello David,

    i checked both articels before I post my question here. In detail the articels did not match on my requierments. At the end I want to implement my form on a page like "success.aspx" in the _layouts folder. This have various of reasons. One is I can run inline-code for getting the closing event to redirect, another is, that forms and a interactivity with the user is managed in sharepoint by this page layout and so on...
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.