Sensitive data mask

Masking of sensitive data is used to hide portions of sensitive information in a text field or label by replacing selected characters with a symbol *. This allows protecting data such as PESEL or credit card numbers so they are not fully visible on the screen. The property Sensitive data mask can be found in the component's properties panel, in the Securitysection. After enabling masking, specified characters of the field value will be displayed as asterisks.

Illustration 1. Sensitive data mask in a Text Field

Keep in mind that sensitive data masking works only for fields populated with data from another source (e.g., a value retrieved from another field or service). If the user enters data into the field manually, the mask will not be applied – the entered characters will remain fully visible. For example, if the text field A is automatically populated with a value copied from another field B (data source from another field), then on field A we can apply a mask to hide part of the information. However, if the user types data into A manually, masking will not take effect.

Masking can also be applied to components of the type Label (Text) that display application data. For a label, besides enabling masking itself, an additional option is available Sensitive data masking condition – it allows specifying a (logical) condition under which the given label will mask its value. This makes it possible, for example, to mask a PESEL number only for certain types of users or in specific process states.

Illustration 2. Sensitive data masking condition in a Label
circle-info

Note: Do not combine Sensitive Data Mask with other formatters on the same field at the same time. For text fields, it is recommended not to apply sensitive masking simultaneously with a formatter (e.g., phone number formatting) to avoid conflicts and unexpected formatting behavior.

circle-info

Demo application: demoTextComponents

Last updated

Was this helpful?