export data from existing form to another form

T

techy

I desperately need help on how can i open a new sub-form from existing form
and pass the values of the fields in main-form to the sub-form.
 
A

Alex [MSFT]

You need some way to communicate between two forms; the easiest way to do so
is to have a web service to which the main form submits data, and the child
form gets the data from.

Alternatively to having two separate forms, I can suggest using a single
multi-view form - this will make passing data around much easier; besides,
you can implement permissions the same way using Roles and rules for view
switching.

Good luck,
Alex @ Microsoft
 
T

techy

Thank you Alex.That looks to be a good idea.But my problem is that I want to
have two seperate datasource to receive data and i really do not have any
clue as to how to include both of them in the same form.
 
P

Patrick Halstead [InfoPath MVP]

Hi Techy,

In addition to the options Alex mentions, here are three other ideas:

1) If you have a SharePoint site, you can set up a list adapter and just
import the contents of one form into another using merge functionality. This
is a good design pattern for SharePoint implementations because it prevents
the form from actually locking the imported forms. We use this a lot for
forms that have metadata (comments or routing info). For example, we create
a form for just the comments and import the main data into it. If they need
to edit the main data, then we have a button that opens the main data form
in another InfoPath form, where it's not read-only.

2) You can open a form from an existing form by just calling NewFromSolution
or NewFromSolutionWithData. Greg Collins has a great solution available on
our website at:
http://www.infopathdev.com/howto/tutorials/default.aspx?i=5387945327d4477089eb9cfea1e8858f
for doing this.

3) A variant of idea #1 is to just use merge forms to do the Form A -> Form
B conversion. InfoPath has rich support for forms aggregation, but nobody
knows about it because a) documentation and examples are hidden in the SDK,
and b) requires XSLT knowledge (and XSLT is hard to debug).

Hope this helps!

Patrick
http://www.infopathdev.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top