Showing results for 
Search instead for 
Did you mean: 

How do we mask the numbers in Universe

Former Member
0 Kudos

How do we mask the numbers in universe

Below is the example how i want to display in the report output

•Current format:  0007762000000000096008039USD
•New format: 0007762xxxxxxxxxxxxx80395USD

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Praveen,

Are we sure that this is always going to have a fixed number of characters?

I thinks there is already a post from you on this regards at Webi level.

Here's how you will create it at universe level.

{fn concat(({fn concat(left(@Select(Orig_Object),7),'xxxxxxxxxxxxx')}),Right(@Select(Orig_Object),8))}

Replace Orig_Object with the Object that contains the original string.

Hope this helps.



Active Contributor
0 Kudos

Try to create a object at the Universe level with the below code (function I used is for Oracle, Incase of other database need to change the function accordingly).

I used the string you provided, but you can replace it with the database feild:

Select to_char('0007762000000000096008039USD') as Orig_Card_Number, Concat(Replace('0007762000000000096008039USD',Substr('0007762000000000096008039USD',8,Length('0007762000000000096008039USD')-4),'xxxxxxxxxxxxx'),Substr('0007762000000000096008039USD',Length('0007762000000000096008039USD')-7,Length('0007762000000000096008039USD'))) as Mod_Card_Number from Dual

See if that work.