How to open form with parameter - InfoPath Dev
in

InfoPath Dev

How to open form with parameter

Last post 07-27-2005 01:51 PM by Patrick Halstead. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 07-26-2005 09:12 AM

    How to open form with parameter

    I have a web portal to my client's organization. The users open instance of InfoPath from this web portal. Can I open InfoPath form by sending it parameter witch will be use in the OnLoad of the form?

    How can I do it?
    How to send the parameter?
    How to input this parameter in the OnLoad of the Form's code (use code in c#)??
  • 07-26-2005 10:06 PM In reply to

    Re: How to open form with parameter

    Hi Liorlankri,
    Which parameters? Is it a new form or a previously edited and saved on? For the latter, best to use a template.xml. Another technique is to use /aggregate and import the form to enable special parsing it on load. Need more info on your requirements though.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 07-27-2005 12:02 AM In reply to

    Re: How to open form with parameter

    My submit of the form enter the form's input into database. The user open an instance of a form from a web portal (aspx page). I need to pass a integer parameter to the form from this web page. this parameter will be entered to the database with the other form's input.
    On the web portal's server there is empty instance of the form called template.xml (Notice this is XML file and not XSN). When the user click to open instance of this form the system (ASP code) create copy from template.xml, give him name and save it on specific location on the server and open it. I need to open it and send parameter from this web page. Can I do it???
  • 07-27-2005 01:51 PM In reply to

    Re: How to open form with parameter

    Hi again,

    Isn't it a better idea to create the unique number on submit? How do you know that they will actually be submitting the form? If they don't won't you be left with gaps?

    To pass a parameter to InfoPath, my suggestion would be to either a) insert the idea into the XML before opening (via the ASP code) or b) open the form and import (via /aggregate parameter) a simple form with the ID. Yes, you can do this, but I wonder if the design is good (see above paragraph).

    The web portal has an empty template.xml. You can ignore this. The ASP will have to create a separate id.xml that is imported into your main form. The ASP will also have to call InfoPath with the /aggregate switch passing the "id.form" as one of the paramters. The id.form just contains the id. You will have to enable merge, extract the XSN and add lines to your importParamters tag in the manifest to instruct it on how to import the id.xml form; you will also have to add the id.xsd as a resource, but shouldn't be too hard. The SDK documents how to use aggregation and I believe there is an MSDN lab on it too. Good luck!

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