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

format of a field with a formula

Explorer ,
Apr 22, 2024 Apr 22, 2024

Copy link to clipboard

Copied

Hi,

I am attaching a form with a simple formula in field 20, where we add up fields 10-19.
How do I change the format of field 20 so that '0' does not appear if none of the fields from 10 to 19 are filled ?

Thank you very much for your help !

WS.

TOPICS
Create PDFs , PDF forms

Views

114

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 , Apr 22, 2024 Apr 22, 2024

Use this as custom format script:
if(event.value){
event.value = util.printf("%,2.2f",event.value).toString().replace(/\./gim," ");}

Then use this as 'Validate' script:
if(event.value == 0)
event.value = "";

Votes

Translate

Translate
Community Expert ,
Apr 22, 2024 Apr 22, 2024

Copy link to clipboard

Copied

Use this as custom format script:
if(event.value){
event.value = util.printf("%,2.2f",event.value).toString().replace(/\./gim," ");}

Then use this as 'Validate' script:
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
Explorer ,
Apr 22, 2024 Apr 22, 2024

Copy link to clipboard

Copied

LATEST

Thank YOU ! ❤:rose::rose::rose::rose::rose:

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