Expand my Community achievements bar.

Newbie Alert! Simple question!

Avatar

Level 1

What I'm trying to do is to build a form in LC Designer 8. It's on tabloid extra (11.69 X 18 inches) and all I want to do is have three fields, last name, first name and middle name along the top of the paper. I've got the fields in place and now I want to import from an XML file so that the names import into the fields. I have approximately 250 names in the XML field and I want to end up with 250 sheets with the names along the top. When I import the XML file, I get 1 sheet. All three fields are populated, but I want to get 250 sheets, each with unique data.

Help.

10 Replies

Avatar

Former Community Member

One way you could do it is by using the dynamic nature of XFA based PDF and a feature called Conditional Breaks.  I have attached a sample (may just need to reset the location of the sample data file to test the data merge.  File > Form Properties > Preview).

Items to watch for are:

  1. that the Page level subform is set to Flowed which enables #2
  2. Binding tab on subPos subform is set to allow the subform to repeat based on the data
  3. Pagination tab on the subPos has a Conditional Break set. Basically it says that when the value in fldTitle is not the same then break. Handle the break by placing the subform on top of the next page.

Avatar

Level 1

Thanks for your reply- I downloaded and tested the files you provided and they do exactly what I need! I have a couple of questions I'm hoping you can answer:

Where do I set the Page level subform options?

Hopefully when I find that, the other elements you mentioned will become apparent.

Thanks again for your help with this!

Avatar

Former Community Member

No worries.

The page level subform (you should be looking in the Hierarchy view of the form which by default shows on the left of the Designer screen) in the sample is titles "(untitled subform) (Page 1)".  Select that node and then in the object property window go to the Subform tab and the Content property and notice it is set to Flowed.  To create dynamic data driven forms you need to use subforms of this type in appropriate places.  Once you have done that the subform for the repeating fields will have enabled the "Repeat subform for each data item" property on the Binding tab.

Hope that helps.

Avatar

Level 1

Thanks for the help! The combination of replies and the sample file got me very close to a solution. Now, I have 3 fields: Last Name, First Name and Middle Name. Is there a way to merge or concatenate the contents of those fields so that it prints, for example: Smith, John A (sort of like a mail merge in Word)? Right now, the fields print and that's great, but there are spaces between the 3 name fields and it would be aesthetically pleasing for it to print like the bolded example. I'm thinking that this might be a FormCalc or JavaScript question-

Thanks for your help and patience with all this.

Avatar

Former Community Member

Assuming your fieldnames are FirstName, MiddleName and LastName and you want to put the concatinated string into a field called FullName. The script woudl look like this:

FullName.rawValue = LastName.rawValue + ", " + FirstName.rawValue + " " + MiddleName.rawValue;

You coudl put this on the calculate event of the FullName field.

Paul

Avatar

Level 2

Hi, I didn't want to have to start a new thread since I have a similiar problem.  What happens in the case that you have a two page form? I've tried this example and it works fine but I noticed my page 2 does not repeat only shows up as 1 page towards the end of the import.  I even tried repeating the subform options of page 2 and nothing happens.  Any ideas on what to do?

Avatar

Level 10

Did you save your form as Dynamic PDF?

You need do the following to make the form as Dynamic.


     1) Goto File menu -> Form Properties and select Defaults tab. Change the Default Render Format as Dynamic XML form

     2) Select the Preview Tab. Set the Preview type as "Interactive Form" and Preview Adobe XML form as Dynamic XML form

     3) Finally while saving the PDF select Save As Type as "Adobe Dynamic XML Form".

Thanks

Srini

Avatar

Level 2

Yes the form has been saved as Dynamic PDF.

Avatar

Level 10

You can post the form here or send an email to LiveCycle9@gmail.com

Thanks

Srini