
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to identify user by email address in an expression in Qlik Sense SaaS?
Hi,
I would like to allow users to see only particular filter fields according to their email addresses. Something like this in the expression for the field of a table object:
= if(USER.EMAIL='user1@domain.com', [FIELD1],
if(USER.EMAIL='user2@domain.com', [FIELD2],
[DEFAULT_FIELD])) // for other users
And in the access section of the load script something like
Section Access;
- Subscribe by Topic:
-
Data Load Editor
-
dimension
-
expression
-
filter
-
Qlik Cloud
-
Qlik Sense
-
Script
-
Section Access
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I haven't found any function that tells the email address of the current user. But instead the ID (IdP) of the current user with
vCurrentUserID='SubField(OSUser(),'=',-1)'
which can be checked against the IDs of other users.
I put the IDs/IdP which can be found in QMC -> users (see Screenshot) in variables like:
vUserName1ID='out0|cs...';
vUserName2ID='out0|cs...';
and then in an expression checks against vCurrentUserID with something like
=if( '$(vCurrentUserID)'='$(vUserNameXID)', ..., )

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this
Section Access;
LOAD * INLINE [
ACCESS, USERID, EMAIL, FIELD_ACCESS
ADMIN, admin, *, *
USER, user1, user1@domain.com, FIELD1
USER, user2, user2@domain.com, FIELD2
];
Section Application;
LOAD * INLINE [
FIELD1, FIELD2, FIELD3
value1, value2, value3
value4, value5, value6
];
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If a user's login, how the user profile looks like? Is this with email ID that is shown?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I haven't found any function that tells the email address of the current user. But instead the ID (IdP) of the current user with
vCurrentUserID='SubField(OSUser(),'=',-1)'
which can be checked against the IDs of other users.
I put the IDs/IdP which can be found in QMC -> users (see Screenshot) in variables like:
vUserName1ID='out0|cs...';
vUserName2ID='out0|cs...';
and then in an expression checks against vCurrentUserID with something like
=if( '$(vCurrentUserID)'='$(vUserNameXID)', ..., )
