Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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
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
Steve,
Did you mean to attach a script?
Thanks,
Sorry Steve,
My browser's fault. Let me check the script.
Thanks,
Ronald.
Thanks Steve - it works.
No worries, all the best.
Steve