I have 2 forms. I would like to Auto-populate the second form with the information from the first form. How would I go about doing that? I tried importing the xml data from the first form into the second form and nothing happened. All the fields on the second form have the same name as the corresponding fields on the first form. I'm not sure what else i'm missing/need to do.
Any help is much appreciated!!
Thanks,
Rose.
Solved! Go to Solution.
Views
Replies
Total Likes
The data can be imported into another form but if it is not based on the same structure or schema (having the same name is not enough) then you can map the inbound data to the fields on your form (this is called binding). In the dataview tab you can create a new data connection (use the sample xml option) and your data structure will appear in the palette. Then simply drag and drop each data node onto the field where the data shoudl go. An icon will be displayed beside the data node to indicate that it has been bound. Now when you import the data the product knows where you want the data mapped.
You can also see where each field on the form is bound by highlighting the filed and clicking on the binding tab.
Paul
Views
Replies
Total Likes
The data can be imported into another form but if it is not based on the same structure or schema (having the same name is not enough) then you can map the inbound data to the fields on your form (this is called binding). In the dataview tab you can create a new data connection (use the sample xml option) and your data structure will appear in the palette. Then simply drag and drop each data node onto the field where the data shoudl go. An icon will be displayed beside the data node to indicate that it has been bound. Now when you import the data the product knows where you want the data mapped.
You can also see where each field on the form is bound by highlighting the filed and clicking on the binding tab.
Paul
Views
Replies
Total Likes
do I create that in the first form or the second form?
Views
Replies
Total Likes
Both the forms should have the similar data connection and bindings to the fields. Then only the XML data from one file can populate the second form..
Thanks
Srini
Sorry for the simple questions...I am a true beginner at this
So I need to have the same data connection in both forms then?
Views
Replies
Total Likes
The reason I said both the forms needs to have the same data connection because in your earlier post you said you are trying to generate the XML from one form and importing to the other form.
If you want to display the data from the XML to a field, that field needs to be bound to that XML tag where you expect the data. For this you need to create a data connection in the form.
What Paul mentioned was you need to first create a data connection with the XML structure you have and then bound the fields on your form with the respective tag. When the field is bound, you can see a icon displayed next to the tag name as shown below image. In the below image I have bound many fields in UserInfo section of the XML except the userId, homeAddress, homePhone, faxNumber, pagerNumber.. So you don't see a icon next to those tags. Rest of the tags are bound to a field on the form.
Once you do a similar binding to your form fields, when you import the XML data from another PDF, data connection will know which tag value will be displayed in which field.
The issue you might have is you did not have the Data connection and binding done in the second form.
Thanks
Srini
Great. Thanks.
This works for the text fields. My next question is...can I do this with the checkboxes?
Views
Replies
Total Likes
Yes you can do the same way to the checkboxes also. You can use the Default binding to bind the check box to a XML tag..
But the tick mark (Check) in the checkbox will depend on the value in the XML.
For example in the below image I set the on Value as 1 and off value as 0. That means if I bound this check box to a XML tag and if the value of the tag is 1 then the check mark will be displayed. Other wise it will not be checked. You can change these values to to what ever way you expect in your XML.
Some prople replace 1 and 0 with Yes and No.
Thanks
Srini
Views
Replies
Total Likes
Thanks to everyone for their help.
My last question was because when I did the "drag and drop" to bind the data to the field, it changed them all to text fields. All I needed to do was go back through and change it back to a check box.
Thanks again!!
Views
Replies
Total Likes
You are correct. Change the Type property in the Field tab to CheckBox.
Thanks
Srini
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies