Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to restrict a group of users from being able to see a column/dimension on a pivot table. The users can be identified with their logon ids. Can a condition using "Show(if...)" type of script be created to facilitate this?
There are two ways (at least). Section access is one way. That's probably the better option, but maybe a bit more work to set up. See here for an introduction pdf.
Or you can use the OSuser() function in the conditional expression of the dimension.
if(OSUser() = 'MyDomain\MyUser',1,0) will show the dimension only if the user is named MyUser and part of MyDomain.
There are two ways (at least). Section access is one way. That's probably the better option, but maybe a bit more work to set up. See here for an introduction pdf.
Or you can use the OSuser() function in the conditional expression of the dimension.
if(OSUser() = 'MyDomain\MyUser',1,0) will show the dimension only if the user is named MyUser and part of MyDomain.
Thanks, Gysbert. It works. But the requirement has somewhat changed for me.
Now I want to restrict not by MyUser but by MyDomain. So let's say that anyone who has the domain "MyDomain" should be able to see it and anyone who does not should not be able to see it. It should no longer be driven by username but by domain name.
HI
Lets try like this
vVariable = 'YourDomainName'
If(vVariable = SubField(OSUser(),'\'),1,0)
For example, vVariable = 'XXXX' <-Your domain name
SubField(OSUser(),'\') giives XXXX
so its display based on that
Hope it helps
Thanks. I tweaked it a bit:
(left(OSUser(),3) = 'xxx',1,0)
Hi
you can use left() function when u know the len of domain..suppose if domain size greater than 3 means ..then its not use ...give preference to subfield() function..
And if u get ur requirement means pls close this link by mark as assumed answer or correct answer..