USERROWFILTER()

From Lianjapedia
Jump to: navigation, search

Purpose

Function to return the rowfilter condition for the current or specified user for the current or specified table

Syntax

USERROWFILTER([<cUsername> [, <cDatabase>, cTable>]])

See Also

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

Description

The USERROWFILTER() function returns the rowfilter for the specified user for the specified database table. If <cDatabase> and cTable> are omitted, the current database and table open in the active cursor are used. If the <cUsername> is omitted, the currently logged in user is used.

Supported from Lianja v3.4.

Example

// 'Harry' has the 'salesuk' role
? userrowfilter("Harry","southwind","customers")  //  --> 'country = "UK"'
 
// 'Sally' has 'salesusa' role
? userrowfilter("Sally","southwind","customers")  //  --> 'country = "USA"'
 
// Logged in as 'Harry'
open database southwind
use customers
? userrowfilter()  //   --> 'country = "UK"'
? userrowfilter("Sally")  //  --> 'country = "USA"'