Expand my Community achievements bar.

SOLVED

Simple calculation - No results shown

Avatar

Level 2

Hi,

I'm a complete newbie to Livecycle Designer and have no clue about Java Script or FormCalc.. Great start, eh??!

What I'd like to do:

I am currently working on a form where I have to add two simple values in Cell1 and Cell2 of my form. (I thought even I could manage that.. turns out I can't!)

My problem:

I've had a look through the forum pages as well as some YouTube videos on how to get this done. Unfortunately, the result field never actually shows a calculation result...

This is what I entered in the script editor (selecting "Calculate" and FormCalc) based on some youtube vids.

topmostSubform.Main.Top.Table3.Row2.Cell3::calculate - (FormCalc, client)

Cell3 = Cell1+Cell2

I've double checked that all fields are set to Numeric, checked the value settings, as well as the cell settings but I can't find out where I'm going wrong and why the result field shows no value at all.

I tried adding the script in the result cell, in the subform the cell is currently sitting in, tried to add .rawValue at the end of each cell name... Nothing is working.

I tried creating a completely new document thinking that maybe something in my form is wrong, but still in new blank form with only three cells in it, there's no calculation happening.

Am I maybe just missing one bit in the script or set the cell incorrectly?

I'd be very, very grateful for any support you could give me.

Thanks

Susanne

1 Accepted Solution

Avatar

Correct answer by
Level 7

I change the script to this and it worked:

710685_pastedImage_0.png

But you said you already tried that? So I'm wondering what version of Adobe Reader / Acrobat you are using to preview your form.

View solution in original post

8 Replies

Avatar

Level 7

Replace your current line of code with the following:

Sum(Cell1,Cell2)

Avatar

Level 2

Hi jnicholas330,

Thanks for your reply. I really appreciate it.

I replace the code as per your suggestions with

topmostSubform.Main.Top.Table3.Row2.Cell3::calculate - (FormCalc, client)

Sum(Cell1,Cell2)

But still there's no results shown in the result field for whatever reason.

Avatar

Level 7

Let's make sure we are referencing the cells correctly. In the script view, place your cursor near "Cell1", then hold shift and click Cell1 (on the design surface, your cursor will turn into a V symbol). Repeat for Cell2.

Avatar

Level 2

Thanks for persisting. I tried that one before and it didn't work either. The cells are references correctly.

I am unsure whether I would maybe need a small software package downloaded in the background for the script to work?

Avatar

Level 7

Can you post your form so we can take a look at it?

Avatar

Level 2

I hope the link works:

It should contain one file "Twist Measurements" where Cell3 is the desired result cell for a simple calculation.

I have also attached another document "TO checks" where I added a "Reset Form" button where I wanted to reset any data entered in section Checklist.Table.Sub. For a start, I only tried to see if it works for the date field but yet again it doesn't, so I'm not sure if there's some basic software package missing.

Thank you SO much!! And have a happy new Year when it comes.

Shared Files - Acrobat.com

Avatar

Correct answer by
Level 7

I change the script to this and it worked:

710685_pastedImage_0.png

But you said you already tried that? So I'm wondering what version of Adobe Reader / Acrobat you are using to preview your form.

Avatar

Level 2

Thank you so much! That was it. I hadn't noticed it before but my company's default PDF is the xchange viewer. I set to my current version of Adobe and it's now working.

Thanks for your help!