Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
CharlieWith
Partner - Contributor II
Partner - Contributor II

Excluding Values from a data set depending on the users.

Hi,

We have a scenario where we are trying to exclude some values from a Dashboard depending on who is opening it. We set the value for who is opening it on open and this is correlated with a list of Excluded Values (EXCLUDED_KEY). I want to take this set of excluded values and use it to exclude a selection in another field (MAIN_KEY) so that these values are available to some users, but not others. 

I have been trying to do this in a macro by selecting all values in EXCLUDED_KEY and then making this selection in MAIN_KEY and selecting excluded from there. This works when there is only one value to be excluded, but does not work for multiple selections.

excluded = ActiveDocument.Evaluate("EXCLUDED_KEY")
ActiveDocument.Fields("MAIN_KEY ").Select(excluded )
ActiveDocument.Fields("MAIN_KEY ").SelectExcluded(excluded)

I have also been looking into doing this with an array, but am struggling to get this to work and am inexperienced in using them.

If I were to set up an array using the following, could I use this to make selections in MAIN_KEY?

vArray = Split(EXCLUDED_KEY, ",")

Thanks,

Charlie

 

Labels (1)
1 Reply
marksouzacosta
MVP
MVP

Hi @CharlieWith,

That sounds like a job for Section Access, OMIT feature. Have you tried that?
https://help.qlik.com/en-US/sense/May2024/Subsystems/Hub/Content/Sense_Hub/Scripting/Security/manage...

 

Regards,

Mark Costa

Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com