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

Suppress the number 0 at the end of a calculation

New Here ,
Feb 05, 2021 Feb 05, 2021

Copy link to clipboard

Copied

Hi everyone...I am new to the community and the program and need help suppressing the 0 at the end of a calculation.  I believe adding a short script is the answer but the scripts I have seen on this forum are not working for me as of yet.

Could anyone guide me with a script that I can add that does not mess up my formula

this is for a music practice-a-thon fundraiser for food banks in NY state.   

thank you so much in advance for your help

 

TOPICS
PDF forms

Views

465

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 ,
Feb 05, 2021 Feb 05, 2021

Copy link to clipboard

Copied

As the custom calculation or validation code of the field enter the following:

if (event.value==0) event.value = "";

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 ,
Feb 05, 2021 Feb 05, 2021

Copy link to clipboard

Copied

Hi....you are good!

thanks so much. for getting back so fast....when I do that, I seem to erase the calculation but you are right...there is no 0 🙂

 

I think I have to but the whole calculation in the script

could you possibly help me with that...

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 ,
Feb 05, 2021 Feb 05, 2021

Copy link to clipboard

Copied

this is for a fundraiser for food banks and I only need to make one form for the year.

It has 11 simple addition calculations that should end with a blank field if there is no data entered.

 

thanks for any help you could offer

 

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 ,
Feb 05, 2021 Feb 05, 2021

Copy link to clipboard

Copied

Hi again....I think I will need to write the whole calculation in javascript and I do not have the ability to do that (I just used the simple field entry method)....would there be someone who might help me create the customized scripts that I need for the 11 fields in my form where I would like to suppress the 0's?  

Or maybe send me a beginner's link to a script creation pdf that will help me create basic Sum calculations.  Thanks so much for any help

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 ,
Feb 05, 2021 Feb 05, 2021

Copy link to clipboard

Copied

Did you try my suggestion above?

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 ,
Feb 05, 2021 Feb 05, 2021

Copy link to clipboard

Copied

Thanks so much for following this....I put your script in the Custom Calculator Script box but when I click there to add it, the Value Is box no longer is active to set the calculation.

 

I think I need to learn how to write out the script for the calculation  and after that, include the script you mentioned that does hide the 0 when I type it in.    I am not sure where to start to learn how to write the script 

there are about 11 addition calculations and 2 multiplication calculations

I want the 0's out so that people who want to fill out the form by hand will be able to print it out and fill it in the old fashioned way. 

 

I have attached a picture of the file with the unwanted 0's          thank you so much for your advice!

Screen Shot 2021-02-05 at 7.26.54 AM.png

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 ,
Feb 05, 2021 Feb 05, 2021

Copy link to clipboard

Copied

You can also use the Validation event, as I wrote in my original reply. That way you could keep your original calculation.

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 ,
Feb 05, 2021 Feb 05, 2021

Copy link to clipboard

Copied

Dear try67,

I cannot thank you enough!!!!!!!!  when I entered that script in the validate tab under Run Custom Validation script....I saved my calculation and hid the 0!  I called tech support twice and they could not tell me that...but you did.  This makes such a difference in the usefulness of this form.  The Harry Chapin Practice-a-thon and foodbanks around NY thank you for your help with making this form now ready for our new virtual realities!

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
Community Expert ,
Feb 05, 2021 Feb 05, 2021

Copy link to clipboard

Copied

LATEST

Glad to have been of help to this worthy cause!

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