Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I'm facing problems again with my section access table. I'm trying to achieve it through Data base.
Following is my Qlik view script.
SECTION Access;
USERADMIN:
LOAD EMPLOYEEID,
NTNAME,
Upper(BUCODE) as BUCODE,
USERNAME,
ROLENAME,
ACCESS
FROM
[..\QVD\02_TransformQVD\Transform_USERADMIN_ROLE.QVD](qvd);
Section Application;
Below is my extract table from db
TRACE ('UTC - UESP USERADMIN ROLE VW Table load');
ESP_USERADMIN_ROLE_VW:
LOAD
USERNAME,
"NTNAME",
EMPLOYEEID,
"ROLENAME",
"BUCODE",
"ACCESS";
SQL SELECT
USERNAME,
"NTNAME",
EMPLOYEEID,
"ROLENAME",
"BUCODE",
"ACCESS"
FROM
Schema."Tablename";
The problem I'm facing here is when I run the qvw in QMC I can only see as USER, which I'm not. I have 2 accounts given in db. One is as Admin and other is as User.
Even other Admins are only seeing one BUCODE and it is not showing them all BU's.
I'm trying to restrict the visibility throught BUCODE which is for ex: CA,DE,AB,SW etc....
I as an Admin should see all BU's and from my other account I should see only DE.
The Query seems right and also Qlik Script but I do not what's happening... Can anyone please help me with this?
Thanks.
I used below script as mentioned...
Section Access;
Users: // First entry = service account. For reloads only !
LOAD * INLINE [
EMPLOYEEID, NTNAME, BUCODE, USERNAME, ROLENAME, ACCESS
SERVICEACNT, CORP\ADMINA, *, SERVICE, ESP ADMIN, ADMIN
];
CONCATENATE (Users) // Next add DB users
SQL SELECT
USERNAME,
NTNAME,
EMPLOYEEID,
ROLENAME,
UPPER(BUCODE) as BUCODE,
"ACCESS"
FROM
Schema."Tablename";
DISCONNECT;
CONCATENATE (Users) // finally, add users from local table
LOAD EMPLOYEEID,
NTNAME,
UPPER(BUCODE) as BUCODE,
USERNAME,
ROLENAME,
ACCESS
FROM
[..\QVD\02_TransformQVD\Transform_USERADMIN_ROLE.QVD](qvd)
WHERE 1 = 1;
Section Application;
But through desktop as well I'm only able to see as a user but not admin.
And you said even Admins will be only have access as a User in access point? They cannot see all BU'S?
That's all highly data-dependent, and since you only post your script code in this thread, I can only suggest you try first with the following technique. Comment out the Section Access; statement (put two slashes in front of it), save and reload. Save again, close and reopen. Put a listbox for field NTNAME on a sheet, and one-by-one select those users that should get a special data treatment. Trace the linkage and you will be able to figure out why some data appears that shouldn't, and why some data refuses to appear while it should.
After you found the cause, do not forget to undo these steps before finally publishing your document.
[Edit] Yes, all Account=ADMIN users will be demoted to USER status in the Access Point. Most of the Admin features (actually Developer features) are useless in the AP anyway...
In DB I've given Blank to all link field values.
And I've commented out Section Access to check with filters in UI and when I select a NTNAME for Admin account I see no data at all, while for a user I see only user related data.
Can you please suggest? and the Link field is linked to a dimension not to fact. Can this be an issue?
the link field should be available in fact table?
the link field I've is linked to a dim table and that dim table is linked to fact.
It gives me Failed to load the document error for only ADMIN account in accesspoint. For user I can see restricted fields.
The current script I'm using
SECTION Access;
ESP_USERADMIN_ROLE_VW:
LOAD
EMPLOYEEID,
NTNAME,
upper(BUCODE) as BUCODE,
USERNAME,
upper(ROLENAME) as ROLENAME,
Upper("ACCESS") as ACCESS;
SQL SELECT
USERNAME,
"NTNAME",
EMPLOYEEID,
"ROLENAME",
Upper("BUCODE") as BUCODE,
"ACCESS"
FROM
Schema."TableName";
LOAD * INLINE [
EMPLOYEEID, NTNAME, BUCODE, USERNAME, ROLENAME, ACCESS
, CORP\S-HRITQLIKDEV-a, , S-HRITQLIKDEV-a, ESP ADMIN, ADMIN
];
SECTION Application;
Are there any settings to be checked or implemented in QMC or Qlikview Services?
If I uncheck the Strict exclusion box I've full access as admin and users can only see user data.
I still have Initial Data reduction based on Section Access as checked.
Usually we check both boxes but unchecking the Strict is working fine for me.
One more question....
The ADMIN accounts are defined in Date Base not in Inline and those users are getting restricted.
so to fully access the data a user should be added to inline as an Admin?
I think I have said everything I can.
If your linkage doesn't work with Section Access disabled, then trace and fix any faulty link field values.