Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How do I add only the fields whose value is greater than an established amount in a calculation?

Andrea444
Level 1
Level 1

I have a Life Cycle Designer PDF form with fields for user input.  I want to add together ONLY the items that are more than $25. Any assistance would be appreciated.

thank you.

1 Accepted Solution
XIIIX-inTVbY
Correct answer by
Level 2
Level 2

I have fixed it for you - YAY

https://www.dropbox.com/s/zbt89nxk6zv0uq2/EQUALIZERx%289-15%29v2%20data%20ADDED%2001%20DONE.pdf?dl=0

I sympathize with your sentiment regarding MS EXCEL but, ultimately, LiveCycle (and the complex coding requirements) is the only way to deliver solutions that can't be messed up by other people.

I still struggle with 'for' loops - they're not nearly as intuitive as 'if, else' constructs BUT mastering both of these constructs gives you 95% of the functionality you were able to squeeze out of EXCEL.

Articles/examples by BRINKMAN (google FormFeed) and NIALL (google Assure Dynamics) helped me a lot in improving my command of LiveCycle Designer.

View solution in original post

0 Replies
gkaiseril
Level 7
Level 7

You need to use the commands for conditional code execution. You can use the JavaScript "if" statement or the FormCalc "if" statement. Note that the syntax for the "if" statement have a different syntax.

The "Scripting Reference" under LiveCycle's Help menu bar item has more information about the FormCalc statements.

Since this is custom scripting you need establish the link to the field objects and then use the "value" property to get the user input for the field.

XIIIX-inTVbY
Level 2
Level 2

You probably need to run an 'if' statement (to cut out values below $25) AND THEN a 'for loop' to sum the remaining values >>

If you can post a link your form, I'll have a crack at it for you..

Andrea444
Level 1
Level 1

 

Hi,

 

I should have probably mentioned that my programming skills are only that which I have had to learn for basic forms, so this is a challenge for me .  http://adobe.ly/1K5ykgK. The item formula that I am stuck on is in trying to resolve Step 3 of the form. I wish it worked like Excel.  That was much easier. 

 

Thank you for your time.

 

XIIIX-inTVbY
Correct answer by
Level 2
Level 2

I have fixed it for you - YAY

https://www.dropbox.com/s/zbt89nxk6zv0uq2/EQUALIZERx%289-15%29v2%20data%20ADDED%2001%20DONE.pdf?dl=0

I sympathize with your sentiment regarding MS EXCEL but, ultimately, LiveCycle (and the complex coding requirements) is the only way to deliver solutions that can't be messed up by other people.

I still struggle with 'for' loops - they're not nearly as intuitive as 'if, else' constructs BUT mastering both of these constructs gives you 95% of the functionality you were able to squeeze out of EXCEL.

Articles/examples by BRINKMAN (google FormFeed) and NIALL (google Assure Dynamics) helped me a lot in improving my command of LiveCycle Designer.

View solution in original post

gkaiseril
Level 7
Level 7

There are way to work around some of these issues with more advance programing.

One can place the values to process into an array, use a filter to remove unwanted items from the array and use a call back function to sum the array.


Andrea444
Level 1
Level 1

Woohoo!!! This does works nicely and I have learned some things by reading the code, which I am sure will come up again some time.

Thank you

XIIIX-inTVbY
Level 2
Level 2

Great news - progress is very much about incremental steps -- my understanding is little more than a function of the knowledge of others. Niall has been very generous in providing so many 'worked examples' for LC Designer practioners - visit his website, download some forms and your capabilities will expand massively !!

www.assuredynamics.com