Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

multiply won't work

Guest
Apr 13, 2016 Apr 13, 2016

I can't for the life of me figure out what I'm doing wrong.  I can't seem to get the multiplication calculation to work.

It's a simple calculation:

# of bags field (fillable field)  x cost of bag field (amount contains value 6)

PLEASE HELP.  It used to bring up the list I could choose from but now it won't even do that.

Is it something in the field formatting that I'm doing wrong

TOPICS
Acrobat SDK and JavaScript , Windows
818
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 13, 2016 Apr 13, 2016

Are the fields you are trying to select listed?

If so and you can not select the individual fields using the mouse. Highlight the field and press the space bar.

If the fields are not listed, make sure the format for the field is either "Number" or "Percentage". Both are number formats and only number formats can be used directly in calculations.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 14, 2016 Apr 14, 2016

All are identified as number formats but they still don't appear in a list.  The multiplication still won't work

The odd thing is I have an addition calculation that works (I can choose fields and it sums correctly)

Now I'm trying to add another addition calculation as well as the multiply calculation and neither will show the fields to choose form.

Could it have anything to do with the position of the fields?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 14, 2016 Apr 14, 2016

The built-in calculation options feed into a lot of JavaScript behind the scenes and at some point these background functions start to fail. Many of the hidden scripts have single character variable and appear to become confused. Probably because of the scope of variables.

I have not heard of custom calculations failing especially when multiple letter field and variable names are used. The custom JavaScript statements for extending and summing price time quantity and summing the extended amounts is not that difficult especially when the form is planned out to support scripting. One can create names for fields in a row in such a manner that the name could be computed. Using hierarchical field names provides some techniques that simplify the calculations even more.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 14, 2016 Apr 14, 2016

In the PROPERTIES / CALCULATION TAB when I choose “value is the” (sum of) the field selection list doesn't even appear at all.  What am I doing wrong?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 14, 2016 Apr 14, 2016
LATEST

At times your approach just fails. As I mentioned with some planning you can write custom JavaScript calculation to perform the calculation.

It is possible to write a custom JavaScript calculation in only one field that can compute the price times the quantity, fill in the extended amount and sum the extended amounts for a subtotal with only 11 lines of code for 1 row of three fields or hundreds of rows. Also the code does not need to be edited for the number rows since the code automatically computes the number of rows.

It might be helpful if you could provide a link to the form or a sample form with the problem. There maybe something else going on that you might not see.

Link to a sample form with a custom script to calculate an invoice with concern about the number of rows. Simple Invoice

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines