Pass data from one form to another. - InfoPath Dev
in

InfoPath Dev

Now you can find InfoPathDev on YouTube and Twitter!
Find Qdabra on Facebook

Pass data from one form to another.

Last post 07-22-2009 05:58 AM by TiltnSpill. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 07-21-2009 11:24 AM

    Pass data from one form to another.

    Good Afternoon,

    First... thank you for creating the Active Directory Web service.  I absolutely love it and don't know how I'd use Infopath without it!

    Currently we have a job posting form (when a new position is available at the company) that HR fills out that gets emailed to all employees, as well as posted in a sharepoint library. 

    In the emailed job posting form is a button for employees to click on to apply for the specified position.  This button opens a new form for the employee to apply for the position.   In the current form, a user has to select the Job posting number (unique value) from a drop-down (populated from sharepoint data connection) What I'd prefer is if this when the user presses the "apply for this position" button, the job posting number will automatically be passed from the job posting form to the job application form. 

    DO i need code in order to do this... can I use qRules to accomplish this instead?

    I know if I created a new view instead of opening a new form this would be MUCH EASIER.  However, the forms need to be seperated.  (The 2 forms are parts of different business processes, the first form is the END of one process, the 2nd form is the beginning of another.)  I hope i've explained myself properly :-\

  • 07-21-2009 12:50 PM In reply to

    Re: Pass data from one form to another.

    You need to use code. When you use code to launch a new form, the function returns the XDocument of the newly opened form. You can use that XDocument to manipulate the DOM of the new form the same as you would your current form. Thus you can get a value from your current form and set it in the new form.

  • 07-21-2009 04:00 PM In reply to

    Re: Pass data from one form to another.

    Patrick Halstead and I were just talking. There is another way to do it without code. It involves Input Parameters. qRules 1.7 (just released) includes a new command "GetInputParamters" which would need to be employed to accomplish this.

    Currently you are probably using Rules to launch the new form. This would need to change to a link to the XSN. The link would include parameters for the fields you wanted to populate in the new form. The new form would use qRules to get each parameter, one at a time, and populate the value into the destination fields.

    A sample link would look like this:

    http://www.myhostingsite.com/path/template.xsn?param1=XYZ&empId=123456&username=Greg Collins&whatever=Something else really cool

  • 07-22-2009 05:58 AM In reply to

    Re: Pass data from one form to another.

    Thanks Greg for the response.   I have one question (which is probably an idiot question.)

    This method of doing things appears to only allow me to pass static values into the new form.  How do I pass dynamic values into the new form?

    In my example... the job posting number is going to be different for each new position that is created.  (this value is stored in a field in the first form.)  How do I pass that number as a parameter dynamically?  Lets say my field name is "Job_ID" and it's value is "1-789".  IF modify my link to http://www.myhostingsite.com/path/template.xsn?param1="Job_ID" would the new form read Param1 as Job_ID or would it read param1 as 1-789?

     

     

Page 1 of 1 (4 items)
Copyright © 2003-2010 Qdabra Software. All rights reserved.
View our Terms of Use.