Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikmpate0
Creator II
Creator II

match not working

Hi I'm trying to display a tab with selections for two users.


I have an on Open trigger on the document

=If(Match((Subfield(OSUser(),'\',2)='User1','User2' >0,'SH01','SH02'))) 


I want to add different selections for each user. Can I do this and have I got the syntax correct.


because when I open the document I can't see the correct sheet popping up on open.


Any help appreciated.


regards

M



10 Replies
sasikanth
Master
Master

Hi,

Try this

pick(wildmatch(OsUser(),'*User1*','*User2*'),'SHO1',SHO2')

OR

pick(Match((Subfield(OSUser(),'\',2)='User1','User2'),'SH01','SH02')))

qlikmpate0
Creator II
Creator II
Author

Sorry no doesn't work,

MK_QSL
MVP
MVP

if you are looking for sheet level access use below section access

Sheets Security with Section Access File

qlikmpate0
Creator II
Creator II
Author

Thanks Manish,

I'm aware of section access but this is more to display a sheet 3 of 5 when opening a document.   , hence the usage of on open trigger.

regards

M

qlikmpate0
Creator II
Creator II
Author

this works

=If(Subfield(OSUser(),'\',2)='User1',User2,'SH14','SH05')

can I put selections in here ie I want user1 to show group a and user2  to show group b

sunny_talwar

What are groups here?

Not applicable

hi Mina,

try with below expression:

=Mixmatch(osuser(),'DOMAIN\USER1','DOMAIN\USER2')>0

qlikmpate0
Creator II
Creator II
Author

When I mention groups I'm saying that user one should only be able to see Northwest sales, and user2 only southwest sales. These would be my selections on the sheet.

Currently on the sheet I have a trigger so that when user1 is using the document only northwest sales are displayed, but I'm asking how can I add another trigger to say if user2 is logged on to show southwest sales?

hope this make sense.

sunny_talwar

It does, but by doing if logic the user1 will be able to southwest sales if he clears out the selection? If that is something you don't want, then you might want to look into Section Access