Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I've already read the Generic keys document (technical brief), but I'm still not sure whether I need or not.
Currently the data model has a visible SECTION_ACCESS table that is connected to a link table called VIEW_ALL_ASSIST via a field called ID_A. This link table is then connected to the "old" data with the same ID.
Now I would like to enhance the section access with a new part of data, that is not (and shall not be) connected to the existing. Only the section access shall connect the user's rights to see both certain ID_As and newly introduced ID_Bs.
How can I achieve this? I thought of creating a second VIEW_ALL_ASSIST table that connects the section access with the new data. Is that solution possible without a generic key?
Thanks.
Having two reducing fields will cause some problems. First, if you have a user on two lines, e.g.
NTNAME, REGION, PRODUCT
X, A, NUT
X B, BOLT
you would expect that the user X can see NUTs in A and BOLTs in B, but not the other way around. But this is not how QlikView interprets the table. Instead X will see NUTs and BOLTs in both A and B.
In your case, the two fields are uncorrelated, so it should work anyway. So the above statement is correct. I just mentioned it since I think it is bad practice to use several reducting fields...
HIC
Still no working solution .
I tried to follow your suggestion loading the section access in three tables, Main, T1, T2. This only works as long as the 'Section Access;' and 'Section Application' commands are commented.
As soon as I activate them, I receive a General Script error at the end of the load. Do you have an idea what this might be?
That's an excerpt of the data model if the section access tables are loaded as normal tables.
That is the script to load it (I added few comments that are not part of the regular code):
Temp:
LOAD
ACCESS,
NTNAME,
PARTY_ID,
PARTY_ID_all
TERRITORY_ID
FROM ..\QVD\ref_SF_ter_ACCESS_TABLE.qvd (qvd)
WHERE NTNAME<>'*';
SECTION Access;
Main:
LOAD DISTINCT
'USER' as ACCESS,
NTNAME,
NTNAME as USERKEY
RESIDENT Temp;
concatenate (Main)
LOAD * INLINE [
ACCESS, NTNAME, USERKEY
ADMIN,ROOT\FUNC.QVTISE, ROOT\FUNC.QVTISE //publisher user
ADMIN,QVD1HW\JENS, QVD1HW\JENS
ADMIN,QVD1HW\ADMQV, QVD1HW\ADMQV
ADMIN,QVD1HW\MARKUS, QVD1HW\MARKUS
... //more ADMINS here
];
T1:
LOAD DISTINCT
NTNAME as USERKEY,
if(PARTY_ID_all = 1,'*',num#(PARTY_ID)) as PARTY_ID //VIEW_ALL users (PARTY_ID_all flag set to 1) shall get a row with a '*', all others the PARTY_IDs in number format
RESIDENT Temp;
CONCATENATE (T1)
LOAD * INLINE [
USERKEY, PARTY_ID
ROOT\FUNC.QVTISE, *
QVD1HW\JENS, *
QVD1HW\ADMQV, *
QVD1HW\MARKUS, *
... //more ADMINS here
];
T2:
load distinct
NTNAME as USERKEY,
if([PARTY_ID_all]=1,'*',UPPER(TerritoryId)) as TERRITORY_ID //same as for PARTY_IDs. VIEW_ALL users (PARTY_ID_all flag set to 1) shall get a row with a '*', all others the TERRITORY_IDs
Resident Temp;
concatenate (T2)
LOAD * INLINE [
USERKEY, TERRITORY_ID
ROOT\FUNC.QVTISE, *
QVD1HW\JENS, *
QVD1HW\ADMQV, *
QVD1HW\MARKUS, *
... //more ADMINS here
];
SECTION Application;
drop table Temp;
Thanks a lot!
Jens
Henric? Are you there?