These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Calculations in a Split Table

lmbchicago
Registered: Mar 22 2010
Posts: 6
Answered

Hi --

I have taken the template for the time sheet (the table) in LiveCycle and I split it into two parts for my accounting department, as they want two separate weeks for the employee to fill out.

When I data enter the hours the total comes out in both parts of the split table in the total hours field.

How can I get the second table to just calculate what is filled in that one, not in the top part? All the bindings and field names are okay.

Thanks for the help and advice.

-Larry Buck

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Have you checked the calculation in the total field? What fields does it reference?

How did you "split" the table? and did you just copy the total field? or did you make changes to the calculation?

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

lmbchicago
Registered: Mar 22 2010
Posts: 6
Hi -

Thanks for the reply...

Have you checked the calculation in the total field? What fields does it reference?

>> DeptartmentManager.#subform[0].Body[0].Total[0]::calculate - (FormCalc, client)
Sum(Hours[*]) --- Is the calculation for the first table

>> DeptartmentManager.#subform[0].Body[1].Total[1]::calculate - (FormCalc, client)
Sum(Hours[*]) --- Is the calculation for the second table

How did you "split" the table?

>> I deleted the rows I didn't need and then copied and pasted the 6 remaining lines
further down the form in a separate area

and did you just copy the total field?

>> Yesor did you make changes to the calculation?

>> No.-Larry
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
The problem with this form is that all the fields are placed individually on the page. There are no subforms for creating a hierarchy. The "Body" element is not a subform, it's a group, so even though it lookes like the copied fields are in a separate subform, they are not. You'll need to wrap each group of fields into a real subform. To do this, select all the fields in a single Body group, on either the design view or the hiearchy window. Then right click and select "Wrap in Subform". Once this is done your form will work properly.

You might want to watch this video:
https://admin.adobe.acrobat.com/_a200985228/p87746471/?launcher=false&fcsContent=true&pbMode=normalThom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

lmbchicago
Registered: Mar 22 2010
Posts: 6
Hi -

Thanks a lot. That worked after I renamed the subforms. Accounting will be happy temporarily.

Thanks again.

-Larry