Skip to main content
Known Participant
April 8, 2020
解決済み

simple format script

  • April 8, 2020
  • 返信数 1.
  • 593 ビュー

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

このトピックへの返信は締め切られました。
解決に役立った回答 Bernd Alheit

After this line add:

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

返信数 1

Bernd Alheit
Community Expert
Bernd AlheitCommunity Expert解決!
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 🙂