Search code examples
maximomaximo-anywhereibm-maximo-worker-insights

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


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


Solution

  • 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.