Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
amar2016
Contributor II
Contributor II

Section acess hide column data

I want to apply section access for the following scenario

I have following data

User,Country,dob

U1,USA,01/01/2017

U2,UK,20/01/2017

U3,SPAIN,21/02/2017

I need to display data as

When U1 logs in then following should be displayed

User,Country,dob

U1,USA,01/01/2017

U2,UK,***

U3,SPAIN,***

When U2 logs in then following should be displayed

User,Country,dob

U1,USA,***

U2,UK,20/01/2017

U3,SPAIN,***

When U2 logs in then following should be displayed

User,Country,dob

U1,USA,***

U2,UK,***

U3,SPAIN,***

15 Replies
eduardo_dimperio
Specialist II
Specialist II

Hi Amar,

Sorry but i didn't understand

"

When U2 logs in then following should be displayed

User,Country,dob

U1,USA,***

U2,UK,20/01/2017

U3,SPAIN,***

When U2 logs in then following should be displayed

User,Country,dob

U1,USA,***

U2,UK,***

U3,SPAIN,***

"

You want to same input different outputs?

amar2016
Contributor II
Contributor II
Author

Sorry my mistake.

I need to display data as

When U1 logs in then following should be displayed

User,Country,dob

U1,USA,01/01/2017

U2,UK,***

U3,SPAIN,***

When U2 logs in then following should be displayed

User,Country,dob

U1,USA,***

U2,UK,20/01/2017

U3,SPAIN,***

When U3 logs in then following should be displayed

User,Country,dob

U1,USA,***

U2,UK,***

U3,SPAIN,21/02/2017

Means the dob of other users should not be visible/marked as * for logged in user

eduardo_dimperio
Specialist II
Specialist II

Hi Amar,

You can do this, but QS only will recognize the user after you load the script.

let user= SubField(osuser(), 'UserId=',3); // Get the current user

U know how to work with "IF"?

amar2016
Contributor II
Contributor II
Author

Thanks. Is there any way to do this (hide data) at script level

Anil_Babu_Samineni

There is option called |Hidden script from Load preview. May be helps this?

Capture.PNG

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
eduardo_dimperio
Specialist II
Specialist II

You can create the same load inside a If.

If(User=A)then

Load Code A

endif

If(User=B)then

Load Code B

endif

If(User=B)then

Load Code B

endif

amar2016
Contributor II
Contributor II
Author

Thanks. But I have around 900+ users. Hence want to apply some logic along with Section Access to hide the data.

Please suggest

maxgro
MVP
MVP

don't think with section access, with section access you can hide data or fields (onit)

Dynamic data reduction ‒ QlikView

You can try in a chart

T3:

load * inline [

User,Country,dob

U1,USA,01/01/2017

U2,UK,20/01/2017

U3,SPAIN,21/02/2017

mydomain\myuser,ITALY,21/02/2017

];

Chart has 2 dimensions User and Country

and 1 expression

if(upper(OSUser())=upper(User), dob, '*****')

The expression is the same for all users

1.png

eduardo_dimperio
Specialist II
Specialist II

Ahhh ok

Try this:

Load

User,

Country

Dob

From

YouQVD

Store YourQVD

let user= SubField(osuser(), 'UserId=',3); // Get the current user

Load

User,

Country

If($user=User,Dob,'****') AS Dob

From

YourQVD