Skip navigation
jaseabra
Currently Being Moderated

How to Autosum in Adobe LiveCycle

Apr 8, 2010 6:06 AM

I have a form that I made up in Adobe Pro 9.  However, I needed to do some stuff to it that only livecycle would allow me to do.  Long story short it is now in livecycle.  Here is my problem, in adobe acrobat I could easily set auto sum for fields that I wanted to calculate.  However I cannot figure out how to do this in livecycle.  Can anyone tell me how to do this?

 
Replies
  • Currently Being Moderated
    Apr 10, 2010 9:17 PM   in reply to jaseabra

    Take a look at the attached. It contains a table that calculates row and column totals.

     

    Steve

    Attachments:
     
    |
    Mark as:
  • Currently Being Moderated
    Apr 11, 2010 9:09 AM   in reply to jaseabra

    The form contains a table called 'costs' containing 5 rows. Since the row is called 'row' it is automatically indexed [0]..[4]. Each row contains the columns as depicted below.

    p1.png

    Take a look at the object 'total'. For each row the calculate event uses a FormCalc expression to total the value of the objects 'beer', 'food' and 'other'. For row one, row[0] since the index is zero-based, the expression looks like this...

     

    // form.page1.budget.costs.row[0].total::calculate - (FormCalc, client)

     

    $.rawValue = beer + food + other

     

    FormCalc is smart enough to associate the objects 'beer', 'food' and 'other' from the current row, add them together and assign the sum to

    '$.rawValue' which is the FormCalc equivalent of saying this value.

     

    The column totals use the  FormCalc expression sum and the notation 'row[*]' to indicate all rows. For the column 'beer' the expression is then 'row[*].beer' for the object 'beer' in every row.

     

    // form.page1.budget.totalCosts.totals.beer::calculate - (FormCalc, client)

     

    $.rawValue = sum(form.page1.budget.costs.row[*].beer);

     

    I hope that helps.

     

    Steve

     

     

     

     

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 12, 2010 8:04 AM   in reply to jaseabra

    ...

    Attachments:
     
    |
    Mark as:
  • Currently Being Moderated
    May 16, 2010 11:53 PM   in reply to jaseabra

    Hi Guys,

     

    I saw this post and I was happy that it's possible to add this in pdf but I could not figure it out the same with jaseabra could you help me please Steve... I've attached the file it's in pdf and doc format.. also.. there's an image at the back of the document... if your having difficulty placing the script you can remove the background.

     

    Thank you in advanced!

     

    graffyx™

     

     

    PDF

    http://bit.ly/cTLjm1

     

    DOC

    http://bit.ly/b9QQIW

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 26, 2013 4:37 AM   in reply to graffyx

    udrugasasrcem.com/test4.pdf

    Can someone please help. I cant seem to get to sum the values when adding new table rows. I tried everything. Here's the pdf.

    udrugasasrcem.com/test4.pdf

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 26, 2013 5:52 PM   in reply to darje6666

    The solution is very simple.

    • You have to use this script in the calculate-event of your target field (nomally in the table footer). You have to use Formcalc.
    • If you create instances of the row your code have to be:
    • If the name of your row is another you have to adpt htis.
    • If the name of your amount field another you have to adapt this.
    • I think this is the version which you need then you create instances of the row. But I can't help because I can't see which field is a amount field in your pdf
    $ = Sum(Row1[*].amount)
    //in your pdf maybe
    $ = Sum(Row1[*].iznos)
    

     

    If you create instances of the amont field you have to write

    $ = Sum(amount[*])
    

     

    Hope it will help,
    Mandy

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points