Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have just read about the possibility of loading data for the SECTION_ACCESS from an external file and I tried it out, causing the automatic reload to fail - it works when I disable the second LOAD again.
What happens exactly is this:
- I have an inline table for SECTION_ACCESS with the fields ACCESS, NTNAME and OMIT. In the inline table, there are three users
that I want to be ADMINs, so their ACCESS is ADMIN and their NTNAME is >>domain\name.name<<.
- To that inline table, I concatenate the contents of an Excel file with two fields: ACCESS and NTNAME. All the users in that Excel file
have the ACCESS USER and the NTNAME is just like the ones in the inline table.
<=> When I have that LOAD active, the reload via the server fails - when I do it manually it's fine (via the server, there is another
user whom I have written in the inline table (directly in the script) as ADMIN.
<=> when I deactivate (comment) that LOAD, automatic reload via the server works fine as well.
=> Can anyone think of a reason for this?
Thanks a lot!
Best regards,
DataNibbler
Hi
You can construct the table outside of section access and then resident load the contents inside section access. if you don't need the table for some other purpose, you can then drop it afterwards in the application section. Something like this:
T_ACCESS:
LOAD * INLINE [
ACCESS, NTNAME, OMIT
ADMIN, [domain]\ntg.qlikview-it,
ADMIN, [domain]\friedrich.hofmann,
USER, [domain]\rgb1.hr,
];
Concatenate (T_ACCESS)
LOAD
ACCESS,
NTNAME
FROM
Users_with_limited_access_rights.xls
(ooxml, embedded labels, table is Sheet1);
Section Access;
LOAD * RESIDENT T_ACCESS;
Section Application;
DROP TABLE T_ACCESS;
HTH
Jonathan
PS: The problem that you are seeing may be because the two tables are not identical in field structure, so they will not automatically concatenate.
Do you have a code snippet? I do something similar for one of my clients without any issues. If you are using a strict exclusion does the user have data? Is the server running as a user who has admin rights?
Hi Felim,
I'll start with the second question: Yes, the server-user has ADMIN rights and is written directly in the script, in the "first part" of the SA.
Providing a template of that app is a bit difficult and the SA using the NTNAME would probably block you if I was to provide it. But I can copy the code I am using, exactly as it is in the app.
>>> First part <<<
Section Access;
LOAD * INLINE [
ACCESS, NTNAME, OMIT
ADMIN, [domain]\ntg.qlikview-it,
ADMIN, [domain]\friedrich.hofmann,
USER, [domain]\rgb1.hr,
];
>>> Second part <<<
LOAD
ACCESS,
NTNAME
FROM
Users_with_limited_access_rights.xls
(ooxml, embedded labels, table is Sheet1);
[attached is the Excel file that is loaded for the second part]
Thanks a lot!
Best regards,
DataNibbler
P.S.: One very strange thing is that it works fine - first and second part of SA and all the script - if I do it locally, but via the server it doesn't...
Hi
You can construct the table outside of section access and then resident load the contents inside section access. if you don't need the table for some other purpose, you can then drop it afterwards in the application section. Something like this:
T_ACCESS:
LOAD * INLINE [
ACCESS, NTNAME, OMIT
ADMIN, [domain]\ntg.qlikview-it,
ADMIN, [domain]\friedrich.hofmann,
USER, [domain]\rgb1.hr,
];
Concatenate (T_ACCESS)
LOAD
ACCESS,
NTNAME
FROM
Users_with_limited_access_rights.xls
(ooxml, embedded labels, table is Sheet1);
Section Access;
LOAD * RESIDENT T_ACCESS;
Section Application;
DROP TABLE T_ACCESS;
HTH
Jonathan
PS: The problem that you are seeing may be because the two tables are not identical in field structure, so they will not automatically concatenate.
Hi Jonathan,
I have just noticed the asymmetry and fixed that. If it doesn't work now, I'll do as you propose.
Best regards,
DataNibbler
Works! Gr8!
Thanks Jonathan!
The log file is now generated, too, so all is ok for the moment - until I proceed to the next step, I guess 😉
(that will be adding the OMIT fields - which means every user with USER access will take up 8 lines as there are 8 name_fields (I had to work with some alias names to avoid synthetic keys).
Best regards,
DataNibbler