1
0
-1

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

 

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      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");
        CommentAdd your comment...
      1.  
        1
        0
        -1

        Hi

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

         

          CommentAdd your comment...