If two forms use field layouts that are very similar, you
may be able to add nodes to the data from one form so that the data
can be successfully merged with the second form. You can use XPath
expressions to add nodes to the data model of xfaForm variables.
The following illustration shows the data models of two different
xfaForm variables (xfaform1Var and xfaform2Var)
for populating two different forms (Form1 and Form2).
The difference between the two schemas is that the schema for
the xfaform2Var variable includes the manufacturerID node
below the root node of the form schema. The data in the xfaform1Var variable
is made compatible with Form2 by adding a manufacturerID node
to its schema.
The following expression adds the manufacturerID node
to the data schema of xfaform1Var:
/process_data/xfaform1Var/object/data/xdp/datasets/data/Form1/manufacturerID
This expression is used as the value of the location attribute
for a Mapping property of a Set Value service’s execute operation
to create the manufacturerID node.
Note: To preserve the original form data, you must
copy the data to another variable before you modify the data schema.