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

PDF-Formular Berechnung (Textfeld): Wenn die Zahl 0 ist,, dann Feld leer lassen

New Here ,
Jul 15, 2020 Jul 15, 2020

Copy link to clipboard

Copied

Hallo Zusammen

 

Ich habe mein erstes PDF-Formular mit Acrobat Adobe erstellt. Dazu habe ich unter Textfeld-Eigenschaften/Berechnung die Option Wert ist Produkt (x) verwendet.

Soweit so gut, nun würde ich mir aber wünschen, dass nur eine Zahl ausgegeben wird, wenn diese nicht 0 (Null) ist. Dies heisst, ist die Zahl Null so soll das Feld einfach leer stehen und nicht die Zahl Null ausgeben. Ist dies überhaupt möglich und wenn ja wie?

 

Besten Dank im Voraus für die Unterstützung

Oliver

TOPICS
Create PDFs , PDF forms

Views

3.4K

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 2 Correct answers

Community Expert , Mar 13, 2021 Mar 13, 2021

As the custom validation code of the field enter this:

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

Votes

Translate

Translate
Community Expert , Mar 02, 2022 Mar 02, 2022

"As the custom validation code of the field enter this:

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

 

"The only disadvantage is, that i have to get my (big) sum formula also to Java, because i can´t use the field selection and additional a custom code."

 

You should use this script as a "Custom Format Script" instead of a "Custom Validation Script" because the Format script only modifies the display in the field, it does not change its real value which is always zero and therefore remains usabl

...

Votes

Translate

Translate
New Here ,
Mar 13, 2021 Mar 13, 2021

Copy link to clipboard

Copied

Die Frage stellt sich mir auch, weiß niemand eine Lösung ?

LG

Ingrid 

 

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 13, 2021 Mar 13, 2021

Copy link to clipboard

Copied

As the custom validation code of the field enter this:

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 ,
Mar 21, 2021 Mar 21, 2021

Copy link to clipboard

Copied

Thank you, works perfect.

The only disadvantage is, that i have to get my (big) sum formula also to Java, because i can´t use the field selection and additional a custom code. The one or the other....  

But thats nice to get practice ..... 😉

 

 

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 Beginner ,
Mar 02, 2022 Mar 02, 2022

Copy link to clipboard

Copied

Hallo ist das immernoch eine gültige Lösung? ich gebe es hier in ein PDF Formular ein aber es passiert nichts. 

Viele Grüße

Robert234005925fti_0-1646219468118.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 ,
Mar 02, 2022 Mar 02, 2022

Copy link to clipboard

Copied

Where does you use the script?

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 Beginner ,
Mar 02, 2022 Mar 02, 2022

Copy link to clipboard

Copied

I don't understand the question. It's a contract sheet. I want to use it on Computer with windows.

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 Beginner ,
Mar 02, 2022 Mar 02, 2022

Copy link to clipboard

Copied

Robert234005925fti_0-1646226570518.jpeg

 

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 02, 2022 Mar 02, 2022

Copy link to clipboard

Copied

It should work. Could you share the file with us?

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 02, 2022 Mar 02, 2022

Copy link to clipboard

Copied

"As the custom validation code of the field enter this:

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

 

"The only disadvantage is, that i have to get my (big) sum formula also to Java, because i can´t use the field selection and additional a custom code."

 

You should use this script as a "Custom Format Script" instead of a "Custom Validation Script" because the Format script only modifies the display in the field, it does not change its real value which is always zero and therefore remains usable for further calculations.

 

Capture_215.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 Beginner ,
Mar 04, 2022 Mar 04, 2022

Copy link to clipboard

Copied

LATEST

Thank you very much. That safed my day 😉

 

 

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