views:

48

answers:

1

Hi,

I have been working with InfoPath forms for the last two months or so, and I now have the following requirement:

I have a form which is filled in by certain users, then sent to other users. The latter, after viewing the data on the form, have the possibility to either Accept & Reply or Reject.

When they click on Accept & Reply, another form is triggered, in which some of the fields are repeated. I would like to know how to get the values from the first form to that triggered form.

Let me precise that I am not using SharePoint; they are accessing the forms from a shared folder on the LAN.

Thanks in advance for your help on this.

Yusuf

+1  A: 

That I know of you can't directly access the new form since Infopath keeps all instances separate (SDI vs MDI). You need a "middle" storage location. A database isn't a bad idea if you have one available - when the user clicks the button, data is saved to the DB, then the new form is opened and reads from the DB on form load.

Another way we have used (which is equally as cumbersome), is to use a blank copy of the form itself (not the original xsn). It is bad because you have to manually keep the blank copy up to date if you change the template but works well for what you are doing. Only recommended if you REALLY need those fields populated and you don't have a DB you can use for temp storage.

Open your form template like you are going to fill in the form but just save a "blank" copy to the share (it will save as xml). The process behind the button on your source form is: create a unique copy of the blank form (we store them all in a subfolder that gets cleaned out nightly), programmatically open and edit that new blank copy (easy since it is xml) putting data in the correct fields, save the edited copy, open the edited copy for the user instead of the xsn.

ktharsis
This is a very complete answer, and I think the temporary database solution should be the most appropriate; however, in the division I'm working, people are not all using the same InfoPath version; the oldest is 2003 and the newest is 2010. Since I have to cater for these, it seems like saving to a database (or an XML file for that matter) is not possible. So do you know of any solution using InfoPath 2003?
Yusuf
Version shouldn't matter for the DB solution (or the XML file) since you are only storing raw data. Have a table with columns for all the fields that are "shared" plus a key. The first form saves to the table, the second form reads from them. All versions of IP can do that with secondary data sources. You could also used a managed code solution with a bunch more work.
ktharsis
Actually it seems like I cannot use an Access DB or an XML file for a 2003-compatible form.
Yusuf

related questions