Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Author

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

View solution in original post

5 Replies
Not applicable
Author

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
Author

Steve,

Did you mean to attach a script?

Thanks,

Not applicable
Author

Sorry Steve,

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

Thanks,

Ronald.

Not applicable
Author

Thanks Steve - it works.

Not applicable
Author

No worries, all the best.

Steve