Examples of How add thousand separators to numbers on Datalist

Confluence User - 25 Apr, 2018

Hi Experts ¡ I'm using joget version 6 and have a table with fields stored as numbers , i need that the datalist show these numbers with thusand separators.

Anyone have an example to use javascript , beanshell or any other option available to do it?

thanks

fabian

 

datalists

2


25 Apr, 2018
confluenceUser
confluenceUser

Hi

You can set in form, text field element, to save numbers into database with thousand separator (KB reference Text Field).

 

26 Apr, 2018
confluenceUser
confluenceUser

Hi, I found there is a number format method in StringUtil. https://github.com/jogetworkflow/jw-community/blob/6.0-SNAPSHOT/wflow-commons/src/main/java/org/joget/commons/util/StringUtil.java#L593

So, you can use beanshell like following.

import org.joget.commons.util.StringUtil;
return StringUtil.numberFormat(value, null, null, null, true, "2");
RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print