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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How do I check for an association?

I have loaded our Active Directory information into my application and need to be able to hide or show certain sheets/objects based on whether or not the current user is a member of a particular AD group. If you look at the attached screen shot you'll see the AD group I need to test. The current user is not a member of that group so I need to hide certain sheets from this user. I know I need to put the expression in the Show Sheet - Conditional property but I don't know what type of expression to use.

error loading image

1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Brian - just to clarify my point... You only use Data Reduction to reduce the associated AD Groups, not any other data elements. Otherwise, it's difficult to associate the user with the relevant Groups...

View solution in original post

7 Replies
Miguel_Angel_Baeyens

Hello Brian,

I've I understood your questino right, you want to set a sheet visibility condition so some groups may or may not see the sheet. If so, I'd do

MATCH([Group Name], 'Allowed Group 1', 'Allowed Group 2')


Hope this helps!

Anonymous
Not applicable
Author

Not quite. I need to determine if the current user, OSUser(), is a member of a given AD group. For example, Sheet 1 might be visible to all users who are members of the "AD QV Users" group while Sheet 2 is only visible to users who are members of the "AD QV Admins" group.

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

I think you should use Section Access with the "Dynamic Data Reduction based on Section Access":

1. Load all users using NTNAME into Section Access

2. Create extra field holding the User ID, linked to the original NTNAME

3. In Section Application create a link between this additional User ID and AD Groups.

4. In Document Properties, request "Data Reduction based on Section Access".

5. When you need to check user rights, check if the desired group is available

What's going to happen in the runtime is - QlikView will reduce data down to the current User ID. Only relevant AD Groups will remain available, and therefore you'll be able to check your condition.

cheers,

Miguel_Angel_Baeyens

That was my first guess, but I didin't suggest it since I understood as hiding of sheets, not records.

Anyway is a good step by step primer.

Regards.

Anonymous
Not applicable
Author

Data Reduction is not what I had in mind - just hiding sheets and certain objects. But this may give me an opportunity to play around with Section Access.

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Brian - just to clarify my point... You only use Data Reduction to reduce the associated AD Groups, not any other data elements. Otherwise, it's difficult to associate the user with the relevant Groups...

Anonymous
Not applicable
Author

Ah, gotcha. I haven't used Section Access yet but I'll play around with it. Thanks!