Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all, I'm new to QlikView and have been dropped into supporting the system and helping with developments.
I'm hoping someone would be kind enough to help with this issue. Im trying to get the below code to work by allowing a user that has 9999 against their grower id to have access to all growers.
Heres the key bit: I can get it to work with * but I understand this gives them access to all listed growers, not all growers full stop. We need them to see everything like the admin user can
TempTable:
LOAD
'USER' AS ACCESS,
'*' AS USERID,
'*' AS PASSWORD ,
UPPER(User) AS NTNAME, //Database field or flat file containing NTNAMES
// if ([Grower]='9999','*',[Grower]) AS [Supplier], //used to link to the data
if ([Grower]='9999',NULL(),[Grower]) AS [Supplier Number]
FROM
(
Concatenate (TempTable)
LOAD * INLINE
[
ACCESS, USERID, PASSWORD, NTNAME, Factory
ADMIN, ADMIN, ADMIN, *, *
ADMIN, GS\BUZERA01, *, *
];
//SECTION Access;
//STAR is *;
PermissionTable:
LOAD
UPPER(ACCESS) as ACCESS,
UPPER(USERID) as USERID,
UPPER(PASSWORD) AS PASSWORD,
UPPER(NTNAME) AS NTNAME,
// Supplier as Supplier,
[Supplier Number] as [Supplier Number]
Resident TempTable;
SECTION Application;
I would use the * also for 9999
Then concatenate to TempTable a dummy user with all the growers you read from the Growers.xlsx,
something like
concatenate (TempTable)
load distinct
'USER' as ACCESS,
.......,
'DUMMY' as NTNAME,
Grower as [Supplier Number]
FROM
.........Growers.xlsx
............
All Growers are listed in the section access with a dummy user.
The NTNAME with 9999 (replaced by *) will see all listed values.
--> NTNAME will see all Growers.
I would use the * also for 9999
Then concatenate to TempTable a dummy user with all the growers you read from the Growers.xlsx,
something like
concatenate (TempTable)
load distinct
'USER' as ACCESS,
.......,
'DUMMY' as NTNAME,
Grower as [Supplier Number]
FROM
.........Growers.xlsx
............
All Growers are listed in the section access with a dummy user.
The NTNAME with 9999 (replaced by *) will see all listed values.
--> NTNAME will see all Growers.
Thanks for this, worked a treat!