MASKEDDATA()

From Lianjapedia
Jump to: navigation, search

Purpose

Function to return a string representing masked data

Syntax

MASKEDDATA(<cAlias> | <nWorkarea>, <cColumn> [, <cMask>])

See Also

FILTER(), Guide to the Users Workspace (Video), MD5(), SET FILTER, SET ROWFILTER, SYSDATAMASKS, SYSPERMS, SYSROLES, SYSROWFILTERS, System Tables, USER(), USERDATAMASK(), USERDOMAIN(), USEREMAIL(), USERFULLNAME(), USERNAME(), USERROLES(), USERROWFILTER(), Users and Roles, Users Tables, USERTENANCY()

Description

The MASKEDDATA() function returns a string representing the masked data for the column <cColumn> in the table with alias <cAlias> or in the workarea <nWorkarea> with the mask <cMask> applied. If <cMask> is not specified, then the dynamic data mask for the current user is used. Dynamic data masks are based on authenticated user roles and defined in the Users workspace.

The mask can currently be specified as:

  • default
  • partial
  • email
  • encrypted

Supported from Lianja v3.4.

Example

open database southwind
use customers alias cust in 3
// Display customerid data with 'partial' mask applied
? maskeddata(cust,"customerid","partial")
? maskeddata(3,"customerid","partial")
// Display customerid data with current user's dynamic data mask applied
? maskeddata(cust,"customerid")
? maskeddata(3,"customerid")