Level 1

0% to

Level 2

Tip /

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

View all

## Using LiveCycle, how do I calculate only the prices shown?

user305374
Level 1

Like

1 like

Total Posts

5 posts

0 solutions
View profile

user305374
Level 1

Like

1 like

Total Posts

5 posts

0 solutions
View profile
user305374
Level 1

09-11-2018

Hi experts. I'm a very novice LiveCycle user and have created a form with set prices which are hidden or invisible when the "NO" box is checked and shown when the "YES" is selected. I'm having trouble figuring out how to get the total to only calculate the visible amounts. Can someone help me figure out how to script this? PLEASE, PLEASE, PLEASE HELP! If better suited for a different forum, please let me know which one. Thanks in advance for your help.

#### Accepted Solutions (1)

MVP

Likes

395 likes

Total Posts

2,686 posts

491 solutions
View profile

MVP

Likes

395 likes

Total Posts

2,686 posts

491 solutions
View profile
MVP

13-11-2018

Well, when the form was created in Acrobat its an AcroForm which is totally different to dynamic forms created in LiveCycle Designer.

To share your form just upload it to a accessible webspace and post a link to it here.

MVP

Likes

395 likes

Total Posts

2,686 posts

491 solutions
View profile

MVP

Likes

395 likes

Total Posts

2,686 posts

491 solutions
View profile
MVP

12-11-2018

Assuming your table is build this way: A repeatable row named "Row" with a Price field and a Subform containing a radio button group which can have either the value 1 (yes) or 2 (no) …

… the calculate event of the Sum feld can could be:

// Select prices only form those rows, where the radio button selection is 1

var oCells = Table.resolveNodes("Row.[Subform.RadioButton eq 1].Price"),

iSum = 0;

// Add all found prices together

for (var i = 0; i < oCells.length; i += 1) {

iSum += oCells.item(i).rawValue;

}

this.rawValue = iSum;

user305374
Level 1

Like

1 like

Total Posts

5 posts

0 solutions
View profile

user305374
Level 1

Like

1 like

Total Posts

5 posts

0 solutions
View profile
user305374
Level 1

05-12-2018

I just wanted to Thank you again for your support. You helped me tremendously, and I really appreciate it.

user305374
Level 1

Like

1 like

Total Posts

5 posts

0 solutions
View profile

user305374
Level 1

Like

1 like

Total Posts

5 posts

0 solutions
View profile
user305374
Level 1

13-11-2018

I'm going to attempt to rebuild the form as you've described. My company's firewalls will not allow me to post anything to an accessible webspace. Probably the only way I could share it with you would be to share it from OneDrive via an email link but this would require that you share your email address with me.

I'm way over my head with trying to make this portion of the form work correctly. I was hoping I could get by using just the action builder feature in LiveCycle.

user305374
Level 1

Like

1 like

Total Posts

5 posts

0 solutions
View profile

user305374
Level 1

Like

1 like

Total Posts

5 posts