Error formatting currency column in data list

Confluence User - 08 Sep, 2022

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

datalists

4


08 Sep, 2022
confluenceUser
confluenceUser

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

Remove the comma and try again

09 Sep, 2022
confluenceUser
confluenceUser

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)




10 Sep, 2022
confluenceUser
confluenceUser

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 

12 Sep, 2022
confluenceUser
confluenceUser

Hy Mohamed.

You´re ok ?

I´m select from the date picker.

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print