Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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?

Anonymous
Not applicable
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"?

Anonymous
Not applicable
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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
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

Anonymous
Not applicable
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