Qlik Community

QlikView Security & Governance

Discussion Board for collaboration on QlikView Security and Governance.

Not applicable

Drop/hide column

I want to be able to hide certain columns depending on who is logged in. I played a bit with Section Access but found that I could only reduce document by removing rows and not columns. How can i achieve this? Thanks in advance.

1 Solution

Accepted Solutions
Not applicable

Re: Drop/hide column

Hi

This can be  done by introducing another field to your section - I have used "VAR" (see script).  I then produce another table (Profile) which is the table used within the qvw (the Section Access table cannot be used directly due to it being hidden).

Thus, my users have different functionality available to them within the qvw.  The two users are;

USERNAME     PASSWORD

ADMIN1          ADMIN1

USER1          USER1

You will need to enter these upon accessing the model (if you switch users you will need to close QV Desktop entirely).

As you will see, depending upon the user, the qvw will open with different sheets open, different buttons available and, as you requested, different columns available within the Straight Table, as the expressions are hidden depending upon your role.  You cannot allow user to access the objects properties as they could switch the object to a pivot table which switches off the hide functionality.

To apply this to a pivot table, simply multiply the expression by "ThisRole"  (0) to hide from USER1.  Or if you have a complex authorisation model, use an IF statement. 

I hope this answers your questions, let me know how you get on.


Regards


Steve

5 Replies
Not applicable

Re: Drop/hide column

Hi

This can be  done by introducing another field to your section - I have used "VAR" (see script).  I then produce another table (Profile) which is the table used within the qvw (the Section Access table cannot be used directly due to it being hidden).

Thus, my users have different functionality available to them within the qvw.  The two users are;

USERNAME     PASSWORD

ADMIN1          ADMIN1

USER1          USER1

You will need to enter these upon accessing the model (if you switch users you will need to close QV Desktop entirely).

As you will see, depending upon the user, the qvw will open with different sheets open, different buttons available and, as you requested, different columns available within the Straight Table, as the expressions are hidden depending upon your role.  You cannot allow user to access the objects properties as they could switch the object to a pivot table which switches off the hide functionality.

To apply this to a pivot table, simply multiply the expression by "ThisRole"  (0) to hide from USER1.  Or if you have a complex authorisation model, use an IF statement. 

I hope this answers your questions, let me know how you get on.


Regards


Steve

Not applicable

Re: Drop/hide column

Steve,

Did you mean to attach a script?

Thanks,

Not applicable

Re: Drop/hide column

Sorry Steve,

My browser's fault. Let me check the script.

Thanks,

Ronald.

Not applicable

Re: Drop/hide column

Thanks Steve - it works.

Not applicable

Re: Drop/hide column

No worries, all the best.

Steve

Community Browser