Skip to main content
Known Participant
April 8, 2020
Answered

simple format script

  • April 8, 2020
  • 1 reply
  • 593 views

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

This topic has been closed for replies.
Correct answer Bernd Alheit

After this line add:

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

1 reply

Bernd Alheit
Community Expert
Bernd AlheitCommunity ExpertCorrect answer
Community Expert
April 8, 2020

After this line add:

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

Known Participant
April 8, 2020

Thank YOU very much, it works 🙂