Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Extensive and dependent forms

Avatar

15-07-2008

Hello everyone.



The scenario is the following:

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?



Thanks in advance!



Diego

Replies

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

05-08-2008

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.

Avatar

06-08-2008

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?



Thanks Paul.

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

07-08-2008

Not to this detail. There is a scripting reference that describes the individual commands but that is it.