Skip to main content
Inspiring
Mar 28, 2018 12:28 PM UTC
Answered

number percentage field format needs comma not period

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 is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
Mar 28, 2018 12:35 PM UTC

Use this:

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

8 replies

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
Mar 28, 2018 12:35 PM UTC

Use this:

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

Translate
Inspiring
Mar 28, 2018 12:45 PM UTC

This worded perfectly.

Thank you very much!

Translate