Skip to main content

Member Articles

This forum is for user/member-created articles across the entire Qlik portfolio. Any member that is logged in can create and publish an article here. You must choose the appropriate label in order for the articles to be properly categorized.

Announcements
CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW

Generate Complex Authorization Script in QlikView for Section Access

cancel
Showing results for 
Search instead for 
Did you mean: 
akshaye_c_navale

Generate Complex Authorization Script in QlikView for Section Access

Attachments

Hi Community,

I would like to share with you something which I thing can be very useful.

Few month back i work on Complex Authorization in QlikView for very complex Row Level security. During implementation it was too difficult to create various possible combinations if we have more number of columns.

For example see below security combination where for user TEST2, we you want to reduce the data as per below logic i.e. ([Dim 1]=’A’ AND [Dim 2]=’C’) OR ([Dim 1]=’B’ AND [Dim 2]=’F’)

Annotation 2020-04-03 145730.jpg

In order to archived this we need to create all possible combinations into the Security Bridge table which connect Section Access table & Main data-set on which security need to apply.

But if you have too lot of fields then creating those combinations is too hard. In order to overcome this situation i have written script in QVW which generate this all combinations based on # of fields you supply in configuration.

Testtt.jpg

In Configuration Details, need to specify the parameters values. Once all parameters are pass then you need to Reload the QVW, which will automatically generate script and you can copy the script from Generated Section Access Script section. In Configuration Details all parameters are required

After copying the script, go to STEP 5 where you need to modify the details as per your details & for STEP 6 you need to enable SECTION ACCESS & SECTION APPLICATION lines.

If you have any doubts feel free to ask.

Thanks,
Akshaye

Tags (1)
Comments
francescopuppin
Contributor III
Contributor III

I like it! 

nboccassini
Partner - Creator
Partner - Creator

Can you share your file C:\Akshay Work Place\Data Consumer Document\4_QVD\Transactions.qvd" ??

Gab

akshaye_c_navale

Hey @nboccassini ,

Tool don't require physical QVD file for creating script of various combinations. In tool you just need to configure the variable in configuration section. You can use your QVD file path and update above path with your QVD file path.

Thanks,

Akshaye

trpatel123
Contributor III
Contributor III

Where are we passing parameter values? I mean where we have Configuration Details?

Where we have v_Section_Access_CSV_Headers?

Also I can see below

SET vScript = '// STEP 1 - Create combine data key in table on which section access needs to apply

[MainDataSetForSectionAccess]:
LOAD *
, UPPER(''|'' & $(SourceColumnKey) & ''|'' ) AS [SECTIONACCESS_DATA_KEY]
RESIDENT [$(v_Resident_Table_Name)];

DROP TABLE [$(v_Resident_Table_Name)];

Do we need to remove comments? As I don't see $(vScript) used anywhere..

Sorry but little confusing here.

Version history
Last update:
‎2022-09-21 01:07 PM
Updated by: