Question

Convert Amount into continuous Numeric value

Hi All,

I have a requirement to convert Amount associated with Currency($) and Comma(,) into continuous numeric value.

For Ex:

Input - $150,000 Output - 150000

Input - $12,000,000 Output -12000000

Is there any OOTB function to achieve above requirement? Appreciate your help

Thanks in advance

Comments

Keep up to date on this post and subscribe to comments

September 8, 2019 - 9:16am

Any Inputs are appreciated

September 9, 2019 - 12:46am

have you tried using this pxReplaceAllViaRegex() ?

Pega
September 18, 2019 - 4:45pm

Can you provide some context for this problem? This post is tagged as Reporting, are you trying to retrieve a text value representing a currency amount as a numerical value in a report?

September 18, 2019 - 9:24pm

You can use OOTB - replaceAll,pxReplaceAllViaRegex functions,  but you need to first convert the input type to string since these methods expect input as String.

Pega
September 19, 2019 - 4:13pm

If this is a string stored in a database column, and you are trying to convert it for a report, you can define an SQL Function Alias using the SQL REPLACE function:

REPLACE( REPLACE( column_name, ',', '' ), '$', '' )