Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mgaseron
Contributor II
Contributor II

Mask field(s) dynamically based on OSUser() OnOpen document

Need of assistance! I have an application that needs a few fields masked (or de-identified due to sensitive info), dynamically based on the User accessing the application via AccessPoint. I use an OnOpen event trigger under Documents Properties and set action SELECT IN FIELD to pre-select field, UserSelected, to OSUser(). Based on that selection, a second action is SET VARIABLE with list of associated locations.

However, I'm not getting the expected result. The association works based on what I see when I display the fields in a listbox, but the results in the variable does not reflect the association. Weird thing is, the logic used to get list of associated locations work when used in a textbox object, but when used as part of trigger, it doesn't work. Attached is an example. Any help would be great! Thank you!

4 Replies
Anonymous
Not applicable

Have a look at Section Access A Primer on Section Access

The method you are trying to use would be insecure and leave all your sensitive data easily accessible.

mgaseron
Contributor II
Contributor II
Author

Thanks for the response, Bill. We actually do not want to reduce the data to just the associated locations. All Users are allowed to see all data, with the exception of a few fields. Those just need to be masked (i.e. Patient Name, Patient Address, DOB, etc) so Users cannot identify the person. But, all Users should be able to see metrics related to the patient (i.e. ALOS, Discharge Date, Admit Date, Costs, Revenue, etc).

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I'm not clear how your OnOpen selections will be used to mask data, but I think the Select-then-Set logic won't work as you want anyway. Action #1 does not affect the data seen by Action #2. The concat() in Action #2 is does not use the selected data.

I agree with Bill that Section Access is the way to go. You may be thinking that SA is only used to reduce rows. But it can remove fields as well using OMIT keyword. I think that is the easiest and only secure way to dynamically hide fields from a user.

-Rob

Sui
Employee
Employee

Hey, I have this same requirement and am relatively new to Qlik. How did you solve this problem? Is there a recommended way to do this in QlikSense?