Interactive Report Column - Searchable Data Masking

Video Tutorial

Data Masking

Enable user to search specific record without knowing them other row’s data.

1) Column Formatting

Add below text in HTML Expression

HTML Expression
<span class=”cnic_masking”> #CNIC# </span>

2) Function and Global Variable Declaration

Create function in Function and Global Variable Declaration section


function masking(pThis){

var v_len     = pThis.length;

var v_start = pThis.substring(0, 3);

var v_end = pThis.substring(pThis.length – 4);

if (v_len > 3) {

mask = pThis.substring(2, pThis.length – 4).replace(/./g,”*”);

return v_start + mask + v_end;


return pThis;


3) Execute when page loads

Add below text in Execute when page loads section



cellData = $(this).text();

var masked_data = masking(cellData);



4) Create Dynamic Action

Create a Dynamic Action to execute after report refresh


1) Identification

Name: Masking Data


2) When

Event: After Refresh

Selection Type: Region

Region: <Your Region>

Add True Action

Action: Execute JavaScript Code

2) Settings
Code: $(“.cnic_masking”).each(function(){

cellData = $(this).text();

var masked_data = masking(cellData);



Leave a Comment

Your email address will not be published. Required fields are marked *