cancel
Showing results for 
Search instead for 
Did you mean: 

Simple Types Help

Former Member
0 Kudos

Hello,

I am working on some business rules, where user enters strings such as "1000", "1000.5", "1000.00". I want to convert these strings as "1,000", "1,000.5", "1,000.00" with out writing any programming. So, I am thinking of using simple types for this scenario.

However, I could not figure out how to do this? Could somebody please tell whether I can achieve this functionality.

Thanks. Appreciate your help.

Sunita.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can use simpleType for this purpose with format as: "#,####.##" in the representation tab.

Regards,

Manoj.

Former Member
0 Kudos

Thanks for your help. Unfortunately, my input is not getting reformatted. Because when I enter "1234", its not getting converted to "1,234".

Please suggest how to achieve . Thanks.

Former Member
0 Kudos

Hi,

You need to convert the BigDecimal or Integer to string and format the srting such that it will be using , and . using java.util.regex.Matcher;

java.util.regex.Pattern; classes. Please refer to the Java docs more about these classes.

Regards,

Raju Bonagiri

Answers (1)

Answers (1)

former_member214651
Active Contributor
0 Kudos

Hi,

Refer to the below threads:

Regards,

Poojith MV

Former Member
0 Kudos

HI ,

I think this can be acheived through writing a small java code. Because before converting in the required format u need to check whether the entered no. is in correct format or not.

Thanks

Surender Dahiya