The mask United Kingdom National Insurance Numbers policy generates a random United Kingdom National Insurance Number (NINO) that includes the first two letters (the prefix) and the optional final letter (the suffix) of the source value.
This policy is available with the functions NINOMask.randomNINO() and NINOMask.maskNINO().
To generate a random value not based on an input value, use the function: NINOMask.randomNINO()
To generate a value based on an input value, use the function: NINOMask.maskNINO(record.getItem('<arg.inputAttribute>'))
For example, to generate a random value based on an input value, use the following:
NINOMask.maskNINO(record.getItem('/DEMO/CUSTOMERS/NATIONAL_ID'))
To generate a value based on the input value and mask an additional attribute in which all instances of the input value are masked, use the function: NINOMask.maskNINO(record.getItem('<arg.inputAttribute>'), '<arg.additionalAttribute>')
For example, to generate a value based on the NATIONAL_ID attribute and mask additional instances of the input value found in the CUST_ID attribute, use the following:
NINOMask.maskNINO(record.getItem('/DEMO/CUSTOMERS/NATIONAL_ID'), '/DEMO/CUSTOMERS/CUST_ID')
Argument | Description |
---|---|
inputAttribute | The attribute containing the input value to mask. |
additionalAttribute | The additional attribute in which all instances of the input value are masked. |