There is some forms that need to be fill out sometimes by the customer side and others by company side. The initial form will be filled out by the customer and some of those data are required on the another forms.
How could LiveCycle help?
I've seem something about export/import data using XML. How that works?
I assume that you woudl create two different forms (one for customers and one for companies). If you build them based on the same data structure then you should be able to export/import data from one form to the other.
You could load the data into the data dom but beacuse the data is not bound to any fields in the data you will have to interrogate the data dom to find th evalues that you want. This is doable but it will require soem signicant code. Do you have any programming experience? If not I would not attempt this. If so I can help you. Let me know which way you want to go.
You can use xfa.datasets.data.loadXML(xml to load, param1, param2).
Where param1 is a boolean value that indicates whether the root node of the Dom should be ignored, in this case the children will appear under the root node. False if the root node of the incoming XML should be appended to the current Dom Root. Param2 is also a boolean that indicates whether to replace the current content or not.
You should not overwrite the current Dom as that is what is being mapped to your loaded form. So put the imported data into a new node.
Now that it is loaded you can place a large multi-line field on the form and you can dump the dom into that field to see what it lookslike. To do this use: BigField.rawValue = xfa.datasets.data.exportData("pretty"); Put this on a button so you can be sure that everything is set up before you check the Dom. The pretty flag is only used to make the XML more readable.
Now that we know what the Dom looks like we can now start using it.We simply navigate our way to the node(s) that we want. To access individual nodes you can use expressions like this:
var test = xfa.datasets.data.form1.Page1.Field1.value
Note the use of the value property and not the rawValue when dealing with a node in the DOM. If you want to deal with multiple nodes
var objs = xfa.datasets.data.form1.Pag1.nodes
Now we can look at the length of objs to know how many nodes we have and you can loop through the objects using objs[i] notation.