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?
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.
This should be enough to get you going.
That is the information I was looking for.
I'll do this and the next doubts I'll post here.
By the way, is there any other paper, tutorial or sample I can follow?