User macros in filters and calculations
You can use the following macros in your calculations to get user-related information.
The following example shows how to mask the data for those users who are not in the manager list:
CASE WHEN (INSTR([Manager], ${user.username})>0) THEN ([Country]) ELSE ('*****') END
The following example shows how to show Profit values only for the specific username:
CASE WHEN (${user.username}='george.becker') THEN ([Profit]) ELSE (0) END
To use two macros in a calculation, use single quotes for string values and other respective calculation punctuation. For example, to return first and last names like John Smith, add a space as follows:
${user.firstname} + ' ' + ${user.lastname}
You can use user macros to set up row-level security based on the user logged into the platform. For details, see Add filters with user macros (RLS).
To use two macros in a filter expression, add a space, comma, or any separator that you have in your data. For example, to match against Smith, John, use the following expression:
${user.lastname}, ${user.firstname}
Comments
0 comments