Subforms or any other way to reuse parts?

T

theWul

Hi...
Just started messing around with Infopath I rather quickly ran into groups of fields shared by a couple of forms.
Extracting the common fields into one form sadly doesn't suit the workflow I'm modelling and duplicating those fields into every other form isn't a proper solution either (at least IMHO)...
Thanks ahead...
 
P

Patrick Halstead

Take a look at storing your workflow state in a secondary XML data source or
database. If that doesn't meet your needs, then take a look at BizTalk.

Merge Forms can be used to do some very simple workflow from forms to form.
You can also store workflow state in a database that you query at form
startup but that will require an identifier in the XML. Indeed, that is what
BizTalk does - it stick an attribute in the PI of the form.

theWul said:
Hi...
Just started messing around with Infopath I rather quickly ran into groups
of fields shared by a couple of forms.
Extracting the common fields into one form sadly doesn't suit the workflow
I'm modelling and duplicating those fields into every other form isn't a
proper solution either (at least IMHO)...
 
T

theWul

Sorry for beeing inprecise:

I don't have any problem managing workflow state but have the problem of the same group of fields in lots of forms.

I don't like the idea of partially copying forms definitions, and was looking for a mechanism to reuse blocks of fields in different forms - desperately browsing infopath's menubar for something like "Include Subform..." or "Reference Subform...".

Clearer now?
 
T

TheCZ

Unfortunately I don't think Infopath can do this right now.

For each new form you want to create you will have to design the layou
from scratch.

So, if you have a database you want to interact with using tw
forms...and you create a really nice layout for tables X and Y in for
A...there isn't a way to reuse that layout for a part of form B, sadly


I havn't tried it personally, but if the primary data source structur
of both forms is the same...you MIGHT be able to cut and paste fro
form A into form B.

Drag-n-Drop layouts *would* be a nice feature.


Patrick Halstead said:
Take a look at storing your workflow state in a secondary XML dat source or
database. If that doesn't meet your needs, then take a look a BizTalk.

Merge Forms can be used to do some very simple workflow from forms t form.
You can also store workflow state in a database that you query a form
startup but that will require an identifier in the XML. Indeed, tha is what
BizTalk does - it stick an attribute in the PI of the form.

of fields shared by a couple of forms.
I'm modelling and duplicating those fields into every other for isn't a
proper solution either (at least IMHO)...


[/B


-
TheC
 
P

Patrick Halstead

You want Merge Forms. You can import partial forms into your form by
programmatically calling Import on them. We implemented a similar method for
the Windows Test team. One key aspect was using a very generic schema (for
the common stuff). But, it worked well.

theWul said:
Sorry for beeing inprecise:

I don't have any problem managing workflow state but have the problem of
the same group of fields in lots of forms.
I don't like the idea of partially copying forms definitions, and was
looking for a mechanism to reuse blocks of fields in different forms -
desperately browsing infopath's menubar for something like "Include
Subform..." or "Reference Subform...".
 
M

Matthew Blain \(Serriform\)

I think this is a design time issues, not an edit time issue.

There is no supported mechanism that I know of to re-use parts of forms.
Some ideas in order of complexity:

*) Make sure your common data fields are all in one schema/namespace
distinct from your other data. You can then directly copy around the XSD
files, or reference them from the designer (you can add an entire schema all
at once.)
*) Create a build process. Generate complete forms out of your build
process. (e.g. copy view1.xsl or schema1.xsd from one form/a central
location to the final form.)
*) Load the XSL dynamically using script/code and xdExtension.

--Matthew Blain
http://tips.serriform.com/
 
R

Roger Jennings

An alternative design might be to use multiple form views to handle the
workflow steps. You can use code to customize intermediate output documents
in the process.

--rj

theWul said:
Hi...
Just started messing around with Infopath I rather quickly ran into groups
of fields shared by a couple of forms.
Extracting the common fields into one form sadly doesn't suit the workflow
I'm modelling and duplicating those fields into every other form isn't a
proper solution either (at least IMHO)...
 
T

theWul

Sounds good - an example on "programmatically calling Import" would help A LOT =)
Thanks again!
 
Top