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

simple format script

Explorer ,
Apr 08, 2020 Apr 08, 2020

Copy link to clipboard

Copied

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

Views

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

After this line add:

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

Votes

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

Copy link to clipboard

Copied

After this line add:

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

Votes

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

Copy link to clipboard

Copied

LATEST

Thank YOU very much, it works 🙂

Votes

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