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

Calculate Fields Adobe Mac

New Here ,
Mar 25, 2021 Mar 25, 2021

Copy link to clipboard

Copied

Hi, 

 

New to the forum, so bare with me, also relitivly new to mac, less than a year.

 

I need help creating calculated totals for quotes, we have a current quote format that has options listed,  up to 10-20 options sometimes, with a drop down yes or no next to the price. At the end of the quote we have a total price that would be if they selected all of the options. The customer often complains about signing the last page because the price is not updated with their options selected. 

 

If the option is selected yes, i need the total price to change on the last page of the quote, if the option is selected no i need to have the price stay the same. If an option is selected yes on a deduct, i need the total price to show the subtracted deduct value.

 

Is their an easy way to do this repetitivly with always changing quotes. My owner is not super tech savvy and needs to be able to quote 5-10 jobs a day.

 

Thanks and let me know

TOPICS
How to

Views

821

Translate

Translate

Report

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

correct answers 1 Correct answer

Community Expert , Mar 25, 2021 Mar 25, 2021

Since you didn't provide fields names or how many fields there are, you will have to change that in code yourself.

In your file I see around 8 prices so Il use that number as reference.

Lets say your price fields are named "Price1,Price2...etc" and dropdown fields are named "Dropdown1, Dropdown2...etc"

Use this code in "Custom calculation script" of "Total field:

var total = 0;
for ( var i=1; i<=8; i++){
if(this.getField("Dropdown"+i).valueAsString == "Yes")
total += this.getField("Price"+i).value;}
...

Votes

Translate

Translate
Enthusiast ,
Mar 25, 2021 Mar 25, 2021

Copy link to clipboard

Copied

It's possible but can you provide more informations, like field names, or share your file?

Votes

Translate

Translate

Report

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
New Here ,
Mar 25, 2021 Mar 25, 2021

Copy link to clipboard

Copied

Here ya go

Votes

Translate

Translate

Report

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
New Here ,
Mar 25, 2021 Mar 25, 2021

Copy link to clipboard

Copied

I did not make this format, it was created by my owner, I am open to any changes necessary to make it function how I need it to

Votes

Translate

Translate

Report

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
Enthusiast ,
Mar 25, 2021 Mar 25, 2021

Copy link to clipboard

Copied

What are you trying to calculate because there is no fields in that file?

Votes

Translate

Translate

Report

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
New Here ,
Mar 25, 2021 Mar 25, 2021

Copy link to clipboard

Copied

It changed some of the fields when i did the redactions, but i need to calculate the prices, Price fields need to be set by author and the yes or no drop down box is to be filled out by the signer/ anyone and i need the bottom total amount on page 5 to reflect the price that is listed next to the yes or no, if yes it gets calculated, if no its not included. 

Votes

Translate

Translate

Report

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
Community Expert ,
Mar 25, 2021 Mar 25, 2021

Copy link to clipboard

Copied

Since you didn't provide fields names or how many fields there are, you will have to change that in code yourself.

In your file I see around 8 prices so Il use that number as reference.

Lets say your price fields are named "Price1,Price2...etc" and dropdown fields are named "Dropdown1, Dropdown2...etc"

Use this code in "Custom calculation script" of "Total field:

var total = 0;
for ( var i=1; i<=8; i++){
if(this.getField("Dropdown"+i).valueAsString == "Yes")
total += this.getField("Price"+i).value;}
if(total == 0)
event.value = "";
else event.value = total;

Change 8 to number of  Price fields you have ( assuming there is equal number of dropdown fields)

e.g. if you have 15 price fields change 8 to 15.

Votes

Translate

Translate

Report

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
New Here ,
Mar 26, 2021 Mar 26, 2021

Copy link to clipboard

Copied

LATEST

Exactly what I needed Worked Perfectly, thank you 

Votes

Translate

Translate

Report

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