Skip to main content
Inspiring
March 28, 2018
Answered

number percentage field format needs comma not period

  • March 28, 2018
  • 1 reply
  • 1100 views

I have a format custom script.

if (event.value !=="" && !isNaN(event.value)){

event.value = util.printf("%.2f",event.value*100);

}else{

event.value = "";

}

and a custom validation script........

if (event.value !== "") {

event.value = event.value / 100 ;

}

if (event.value>1||event.value<0)

{

event.value="";

app.alert("L’entrée doit être entre 0 et 100")

}

I need my Percentage field to read 1,50 % (French)

Currently it reads 1.50 %  (English)

Any help would be appreciated.

This topic has been closed for replies.
Correct answer try67

Use this:

util.printf("%,3.2f",event.value*100);

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
March 28, 2018

Use this:

util.printf("%,3.2f",event.value*100);

Inspiring
March 28, 2018

This worded perfectly.

Thank you very much!