How to hide a field value in maximo with special characters similar to a bank account number

898 Views Asked by At

I have a requirement where i am importing some attribute data through integration into maximo.However the client demands the field value needs to hidden or encrypted with special characters and only the last few numbers to be shown similar to a bank account number. How do i achieve this? An example suppose the field value is 1234567 client wants this to be shown as ****567

2

There are 2 best solutions below

1
On BEST ANSWER

I created a non persistent attribute as stated by JPTremblay. and upon getting confirmation with client for a fixed range of numbers for the attribute ACCOUNTNUMBER there was no need for a dynamic script.

so i just created a object launch point script. event is chosen as Initialize

and just one line of code

mbo.setValue("maskaccountnum", "************" + mbo.getString("accountnum")[-5:])

this did the trick. Language was chosen as Jython.

0
On

Here's a simple solution that should do it: define a persistent attribute (accountnum) to save your account number and a non persistent one to display its partially masked version (maskaccountnum).

Create an attribute launch point automation script to initialize the non persistent value.

Python Example:

if not mbo.isNull("accountnum") :
    mbo.setValue("maskaccountnum",  "****" + mbo.getString("accountnum")[-3:])

Add your non persistent attribute to your application.