Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I would like to control section access using a flag. I attached the example file along with script file for the password.
example in this attached document fy2015,france data will be available to PETER only (SEEDATA'column is 0 against him)
'JOHN' and 'USER' should not see fy2015 france data as 'SEEDATA'column is 1 against them.
I need the SEEDATA column since it is controlled dynamically..
Can any one help plz?
Gautham,
I have done little modification in your script and refer the comments in the script too. its working for me, it should work for you too.
Solution is based on Toni and peter.
toni or peter..let me if the solution is correct?
Try like:
left join
LOAD * INLINE [
PERIOD, COUNTRY_SA,PUBLISH
MY2015, DENMARK,1
MY2014, FRANCE,1
FY2014, FRANCE,1
MY2015, FRANCE,1
FY2015, DENMARK,1
FY2015, FRANCE,1
];
Correction in red.
I think your SA script has an incorrect field name. USER field should be named USERID or NTNAME, depending on what user identification you are using.
Your section access looks complicated. My suggestion is that you try to minimize the number of reduction fields, preferably to one composite value. This makes the administration and validation easier.
Section access based reduction is basically equal to selections. To validate your reduction:
If the reduction does not work as you expected with manual selection, you will have to reconsider what is wrong with the selections you apply and find an other approach for how to accomplish the desired reduction.
HI amit
thanks for the response.
it didnt make any difference after changing it to 1.
My requirement is.
ben should see data for france fy2015 where if i login as John, john should not see the fy2015 data for france.
both are controlled by the field SEEDATA column.
@toni... user or userid didnt make any difference..am still able to see their respective data
Any help plz?
In simple words,
from the above table, ben should see france data for period fy2015 but not john and user. it is based on seedata column.
is there any way to achieve this?
I find this confusing. The Section Access table should only contain rows for value the user is expected to see. If John ans User are not supposed to see FRANCE and FY2015, then remove those rows from the section access. This will also make the SEEDATA obsolete, as it does not add any value to the reduction when the unwanted rows are removed.
Toni,
John and USers are supposed to see france country fy2015 data only when i change see data column from 1 to 0, since then i want BEN only to see the fy2015 france data.
actual requirement is discussed here extended section access help
section access on period level need to be controlled by a flag field ultimately.
In QlikView, Section Access is configured during a Reload. You cannot change it later on, as the mechanism is based on a hidden part of your data model and that can only be changed during a Reload.
If you simply want to configure section access externally, for example by way of a flag, then convert the Section Access LOAD statement into one with a WHERE clause like:
:
WHERE SEEDATA = 0;
(although this is largely against expectations) and add a Link Field that connects the Section Access data to the rest of your data model.
Best,
Peter
I do not understand the setup you are trying to accomplish, based on the sample files you have provided. You will be more successful with this by starting all over. Generate one field in the data model where you can control the reduction for each user. Then define a section access table with one reduction field. This simplicity will enable you to stay in control and make sure the authorization works as you expect.
The current section access is not setup in a reasonable way. You should only load records that are relevant for the reduction. This means only load records for valid reduction values, which for example makes the SEEDATA field redundant.
It is also illogical to use 0 as the visible flag, since 0 is equal to false. 1 is a more logical flag for value that are true. My recommendation is that you invert the flags for clarity.
The AuthTable load should be filtered to match the expected reduction. Fields that are not required for reduction should be removed from the table, for example SEEDATA is not needed as it's logic is applied through the WHERE clause. User identity is defined through USERID or NTNAME, so USER is a invalid name in the section access table.
AuthTable1:
LOAD *
Resident SA
WHERE Not (EVALUATOR ='1' and PUBLISH ='0') ;