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

simple format script

Explorer ,
Apr 08, 2020 Apr 08, 2020

Hi I've got format script:

event.value = util.printf("%,2.0f",event.value).toString().replace(/\./gim," ");

 

Please help, how to change it, because now if there is no data, result is '0', should be empty.

 

Thanks !

wieslaw

TOPICS
PDF forms
497
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

correct answers 1 Correct answer

Community Expert , Apr 08, 2020 Apr 08, 2020

After this line add:

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

Translate
Community Expert ,
Apr 08, 2020 Apr 08, 2020

After this line add:

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

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
Explorer ,
Apr 08, 2020 Apr 08, 2020
LATEST

Thank YOU very much, it works 🙂

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