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: 
phillipmacd
Contributor III
Contributor III

Sheet Trigger

Hi All, hope someone could help me with my problem.

I have triggers setup "OnActivateSheet" where I select in field values depending on a user (OSUser()) to filter data for that user,  then lock that field so that users can't see other user's data.

The problem I have is when it is a "manager" that is supposed to see all data, that user can see everything because that user is not in the list of the trigger, but the values in that field can't be selected to filter.

eg.

I add a trigger (OnActivateSheet) , Select in Field, add the field , in the search string I add an IF statement that does the selection ( IF(match(OSUser(UserName),'User1',User1,

                       IF(match(OSUser(UserName),'User2',User2)),

then I lock the field.

When User3 opens the sheet, all the data is available , but User3 can't select any values in the "UserName" field.

 

I tried adding the "unlock field" option with criteria (IF(match(OSUser(UserName),'User3',UserName) but no luck....

Any Ideas on where my issue might be.

 

Regards

 

 

 

2 Solutions

Accepted Solutions
Miguel_Angel_Baeyens

Why not trying with section access? https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Security.htm

When a user opens the app, depending on the access to you have established for each of them, they will only see the data associated with them as well as the sheets (if you want to) only relevant for such user.

View solution in original post

MindaugasBacius
Partner - Specialist III
Partner - Specialist III

That's not the best approach as the more advanced user can simply unlock the fields and then navigate through other users' data.

Section access could be your answer.

View solution in original post

3 Replies
Miguel_Angel_Baeyens

Why not trying with section access? https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Security.htm

When a user opens the app, depending on the access to you have established for each of them, they will only see the data associated with them as well as the sheets (if you want to) only relevant for such user.
MindaugasBacius
Partner - Specialist III
Partner - Specialist III

That's not the best approach as the more advanced user can simply unlock the fields and then navigate through other users' data.

Section access could be your answer.

phillipmacd
Contributor III
Contributor III
Author

Hi Miguel , will definitely have a look, never work with section access before. the tricky part on my side is the Username for each user isn't a 100% match to their username in the data.  So I hard code the matching user to the name in the data

eg. Username = JohnK , name in data = JOHN

       Username = John.JamesL , name in data = JJ

and so on....

the data name is stored in a mapping table which gets updates by the users to link them to their clients.

but will see if I can use section access to solve my issue

thank you very much for the input