Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Help with table calculations

Avatar

Former Community Member

Hi, all, I am working on a form that was previously made in Excel. I wanted to remake this in an expandable pdf fillable so that I can add the accessibiltiy information to the form. The first link is to the static pdf converted from Excel here:

https://acrobat.com/#d=lIGyn*lpuWSQ-Qzkklml6w

The second link is the the form as my strained brain has recreated it. I'm sure there is probably a better method than I have chosen and I am open to all suggestions. But I can't get the table to total.

In the first table, all the calcs work correctly, ie 11, 12, 13, 14 and the total from 14 does show up in 15. but I need 17 to show the amount after the Discount (#16) is deducted. You would think something simple would do the trick, like SubTotal - Discount. That doesn't work.

Column 19 should total in the footer row next to 21. It doesn't. And column 23 should total into space #24. I have been trying for hours at a time to come up with the magic script to make this form work but......now I've decided to grovel for help.

https://acrobat.com/#d=mzovRUkKit7JnPVebPKgZw

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

Here is your form back to you: https://acrobat.com/#d=a06D-SL7SK58ZulXCKNSuw. Please note that all of the scripts are FormCalc, as we are using the sum function and the wildcard. Neither of these will work in JavaScript.

Have a look at this post on how to reference objects, in particular the deomonstration of Control+Click:

http://www.assuredynamics.com/index.php/2011/05/som-expressions/

Also with buttons with linear gradient I would change the click behaviour from Inverted to Outline or None. It will be a little easier on the eyes. I have changed the two Add buttons. Also I think that you are getting in to readibility issues with the contrast between the button background and the black caption. I would recommend a read of this post, which outlines an approach to primary buttons (like the add rows) and secondary buttons (like the delete rows):

http://www.assuredynamics.com/index.php/2010/12/buttons/.

Maybe this discussion on colours:

http://www.assuredynamics.com/index.php/2011/02/any-colour-as-long-as-its-black/

Hope that helps,

Niall

View solution in original post

6 Replies

Avatar

Correct answer by
Level 10

Hi,

Here is your form back to you: https://acrobat.com/#d=a06D-SL7SK58ZulXCKNSuw. Please note that all of the scripts are FormCalc, as we are using the sum function and the wildcard. Neither of these will work in JavaScript.

Have a look at this post on how to reference objects, in particular the deomonstration of Control+Click:

http://www.assuredynamics.com/index.php/2011/05/som-expressions/

Also with buttons with linear gradient I would change the click behaviour from Inverted to Outline or None. It will be a little easier on the eyes. I have changed the two Add buttons. Also I think that you are getting in to readibility issues with the contrast between the button background and the black caption. I would recommend a read of this post, which outlines an approach to primary buttons (like the add rows) and secondary buttons (like the delete rows):

http://www.assuredynamics.com/index.php/2010/12/buttons/.

Maybe this discussion on colours:

http://www.assuredynamics.com/index.php/2011/02/any-colour-as-long-as-its-black/

Hope that helps,

Niall

Avatar

Level 10

...Also with numeric fields (and in particular ones that display curriency) I would be inclined to right align the field (in the Paragraph palette) and set the right margin to 1.5mm.

Avatar

Former Community Member

Excellent. I kept getting an error when I was trying to write FormCalc that the form was xfa blah, blah, blah so I just kept trying different combinations of scripts that I have gleaned from your website as well as this one. I think I even made up a new language or two in the process but I guess it will take a while for LiveCycle to catch up.

I have little snippets of script samples taped all over the walls in my cube. The ones you put in my form are going right up there. I have downloaded everything you have posted on your website but sometimes I just can't figure out what I'm supposed to do to make my form perform the way I need it to.

So thanks, a thousand times, thanks.

Avatar

Former Community Member

And just one more quick question. How do I make the Row1 expandable? There will be several lines of text explaining the services that were rendered.

Avatar

Level 10

Hi,

Have a look at this example that works through making fields dynamic and it includes screenshots:

http://assure.ly/g80MVY.

In the Layout palette, you can tick "Expand to fit" under the height property.

Good luck,

Niall