1
0
-1

Hi guys

i'm trying to format currency column in data list with bean shell script with the following code:


	   String texto = String.format("%,.2f", value);

the joget platform returns the error message below:


``String texto = String.format("%,.2f", value); return "<span style=\"color:green . . . '' : Typed variable declaration : Error in method invocation: Static method format( java.lang.String, java.lang.String ) not found in class'java.lang.String'


obs: this code is running ok on eclipse IDE.


thanks,

Paulo Nascimento

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      String texto = String.format("%.2f", value);

      Remove the comma and try again

      1. Paulo

        Hi Mohamed,

        thanks to asnwer my question.

        After remove a comma the collumn data has a blank values.


        Another error to render in another date time type collumn:

        "ERROR 08 Sep 2022 21:21:52 Date Formatter - jwc_paulomnasc : java.text.ParseException: Unparseable date: "2022-09-13" 5303 java.text.ParseException: Unparseable date: "2022-09-13"


        Collun configuration in Date formatter: (on Brazil dd/mm/yyyy is a large used date format)




      2. Mohamed Elorbany

        Did you manually write this date? or did you select it from the date picker?

        The only way i got this error is by manually writing the date in a different format than the one written in "Data Format" of date picker in form builder 

      3. Paulo

        Hy Mohamed.

        You´re ok ?

        I´m select from the date picker.

      CommentAdd your comment...