How can I create a summary page for the form user?

amyl54731319

13-03-2017

Let me start by saying, I pretty much taught myself Adobe LiveCycle using these forums. Thank you!!

The form I created in LC is very detailed for official record but the user needs a sheet of certain details to take with them out of the office. Most of the information they will need will come from repeating subforms. First the user answers a yes/no question. If the user answers yes, the boxes for information will pop up. I've listed below what I named the subforms and fields of one of the sections I need from the form on the summary sheet.

Original Information put in form:

Subform = SubjectSubform

Subform = SubjectHiddenContainer

Subform = SubjectDescription

TextField = SubjectLast

TextField = SubjectFirst

TextField = SubjectMI

DateField = SubjectDOB

Summary sheet to auto-populate:

Lastname, Firstname MI; 00/00/00

I know I can't global bind because the user of the form will most likely add more than one subject in the form.

I don't really know the first thing about javascript so I don't know if I should have a 'space' instead of an 'enter' or if the [+i+] i should actually be something other than the i or when to put spaces around a symbol, etc.  A coworker of mine gave me the following to put in the textfield on the new summary page but it doesn't work:

     vSubjects+=

     xfa.resloveNode("SubjectSubform.SubjectHiddenContainer.SubjectDescription[+i+].SubjectLast").rawValue+","+

     xfa.resloveNode("SubjectSubform.SubjectHiddenContainer.SubjectDescription[+i+].SubjectFirst").rawValue+" "+

     xfa.resloveNode("SubjectSubform.SubjectHiddenContainer.SubjectDescription[+i+].SubjectMI").rawValue+";"+

     xfa.resloveNode("SubjectSubform.SubjectHiddenContainer.SubjectDescription[+i+].DOB").rawValue+"\n";

Any help is greatly appreciated!

Amy

(if you have a link or know of an online class to a good Intro to javascript that would be a huge help too. So many out there and I don't know where to start.)

Accepted Solutions (0)

Answers (3)

Answers (3)

amyl54731319

20-03-2017

I retyped the equation into this question but I'll definitely recheck the equation in the form. I'll also add the quotes so it looks like ["+i+"] after the SubjectDescription to each statement and let you know how that goes. I will see if I can share the form if those don't seem to make it work. It's a work related form and is confidential but I'll see if it is something I can share to get help with.

Stay tuned!

Thank you so much,

Amy

_Bruce_Robertson

MVP

18-03-2017

Hi Amy,

I agree with MinusZero, just wanted to add you need the double quotes around the +i+, so it should be SubjectDescription["+i+"].SubjectLast ... for all similar cases.

It would be easier if we could see your form if you are still having trouble.  Is it possible for you to upload it to a file sharing site and post a link here?

Designer does have a check syntax button in the script editor, which look like;

CheckSyntax.png

And, make sure that you have "When exception is thrown" set to break in Acrobat under Edit ... Preferences ... JavaScript

Also I've found the Mozilla Developer Network good as a JavaScript resource.  Adobe Reader uses the same JavaScript engine as FireFox.  The problem with this site and a lot of courses available are that Adobe Reader is still using version 1.8 of JavaScript, which is getting old.

Regards

Bruce

MinusZero

15-03-2017

Hi Amy,

There a a few errors in the code you listed.

In the last line it has:

xfa.resloveNode("SubjectSubform.SubjectHiddenContainer.SubjectDescription[+i+].DOB").rawValue+"\n";

But earlier you listed the field as SubjectDOB

Also, xfa.resloveNode is incorrect. It should be xfa.resolveNode in all lines

See if it works now. On another note, i have found stack exchange a good place to find javascript information. I am also self taught with Livecycle and Javascript.