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

Announcements
Now accepting applications for the Qlik Luminary and Partner Ambassador Programs: Apply by July 6!
cancel
Showing results for 
Search instead for 
Did you mean: 
PDurnall
Contributor III
Contributor III

Section Access and OMIT function

I have been working on Section Access and getting OMIT to work,
The way I have it set up is as a QVD Load,

It first gets a list of all users and a Group name,

This can be things like (Person Identifying Details) PID, None PID as an example,
Load * INLINE
[USERID , Section
Me         ,PID
Them   , Non-PID]

it then loads that table back in and assigns ADMIN to the Internal System ones and USER to everyone else.

[Temp_SA]:
IF(WILDMATCH(USERID,'*INTERNAL*'),'ADMIN','USER') AS [1.ACCESS],
UPPER("USERID") AS [1.USERID]
FROM [lib://Qlik_Users.QVD] (qvd);

Then Left joins the Sections which allow PID and give them a Blank OMIT
LEFT JOIN ([Temp_SA]) LOAD
AD & '\' & USERID AS [1.USERID],
Section AS [1.Section],
'' AS [1.OMIT]
Where MATCH(Section,'PID');

once that table has been build I then reload that and pass it through another Load changing the columns to the correct names and all the OMIT items against all users that don’t have PID access.

[S_Acc]:


NoConcatenate Load

          [1.ACCESS]          AS ACCESS,

          [1.USERID]            AS USERID,

          IF(ISNULL([1.Section]),'No Section',[1.Section])          AS Section,

          IF(ISNULL([1.Section]),

          SubField('*First Name*|*Forename*|*Last Name*|*Surname*|*Date of Birth*|*Gender*','|')

          ,[1.OMIT])                                                                                                                                                                              AS OMIT

      RESIDENT Temp_SA;

// Then adds the sections back on as column Section 2 incase they need other access but not PID
LEFT JOIN([S_Acc])

      LOAD UID   AS USERID,

      [Sec]                             AS Section2

      RESIDENT All_Sections;


The Final load brings all of that together into a final table and makes sure all Users have Section and OMIT columns. This is what I then use for Section Access Loads in apps.
[Final Load]:

      NoConcatenate

      LOAD ACCESS,

      USERID,

      IF(ISNULL([Section2]),'No Section',[Section2]) AS Section,

      OMIT

      Resident S_Acc;

For any OMITED Columns you get “incomplete Visualization” which isn’t great for columns in tables.

PDurnall_0-1782308144429.png

 

Instead you can change the columns to be

=[First Name]& ‘’

=[Forename]&’’
and it solves the incomplete visualization issue.

This overall take Qlik Seconds to do and creates around 90,000 rows of data for around 14,000 users as we have a lot of sections / users without PID Data.

So far this is the best way to OMIT large sections of PID from all users who don't have that level access has any one else done some thing similar or a better way?

Labels (4)
0 Replies