Mask French National Institute for Statistics and Economic Studies Numbers

The mask French National Institute for Statistics and Economic Studies Numbers policy generates a random French National Institute for Statistics and Economic Studies Number (INSEE) that includes the two digits representing the department number and the two digits representing the control key of the source value.

JavaScript policy syntax

This policy is available with the functions INSEEMask.randomINSEE() and INSEEMask.maskINSEE().

To generate a random value not based on an input value, use the function: INSEEMask.randomINSEE()

To generate a value based on an input value, use the function: INSEEMask.maskINSEE(record.getItem('<arg.inputAttribute>'))

For example, to generate a random value based on an input value, use the following:

INSEEMask.maskINSEE(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: INSEEMask.maskINSEE(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:

INSEEMask.maskINSEE(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.