Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
inessa_zhurba
Contributor III
Contributor III

An error occured. Access is denied

I am getting above message when using Access section.

Script is basic:

---------------------------------------------------------------

Section Access;

LOAD
    @1
FROM [lib://DataReductionSA (operations_userid)/DataReductionSA.txt]
(txt, codepage is 28591, no labels, delimiter is spaces, msq);

Section Application;
LOAD
    @1,
    @2
FROM [lib://DataReductionSA (operations_userid)/DataReduactionLink.txt]
(txt, codepage is 28591, no labels, delimiter is ',', msq);

------------------------------------------------------------------

DataReductionSA text file contents:

Access,UserID,SA_LINK,OMIT

USER,OPERATIONS\USERID1 ,16

SER,OPERATIONS\USERID2,30

USER,OPERATIONS\USERID3,33

All UserIDs are in cap letters. I changed the ADMIN to USER based on previous posts recommendations.

Would someone please help!

7 Replies
DavidŠtorek
Creator III
Creator III

Hi,

as first thing try to promote lables (instead of @1 there should be Access,UserID,SA_LINK,OMIT) and separate text string into fields . Than it should work. It seems that now it is only text string which is not able to be parsed and correctly connected by Qlik. For example change delimiter to ','.

inessa_zhurba
Contributor III
Contributor III
Author

Hi David, Thank you very much for your very helpful reply!! It worked.

Only problem that I have is: whenever I need to add new users - I have to change the script and republish it every time when a new user is added.

I was hoping to reference a text (or Excel File) where I can easily change entries, instead of changing the script in Load editor.

Would you please let me know if it is doable?

Thanks,

Inessa.

DavidŠtorek
Creator III
Creator III

Hi,

glad to help. Regarding your question that is exactly what are you doing now. You are loading it from txt file or am I missunderstanding something? Your script should look like this.

Section Access;

LOAD
    Access,

     UserID,

     SA_LINK,

     OMIT
FROM [lib://DataReductionSA (operations_userid)/DataReductionSA.txt]
(txt, codepage is 28591, no labels, delimiter is spaces, msq);

Section Application;

LOAD
   <YourField1>,

     <YourField2>,

     ...
    SA_LINK (probably?)
FROM [lib://DataReductionSA (operations_userid)/DataReduactionLink.txt]
(txt, codepage is 28591, no labels, delimiter is ',', msq);

inessa_zhurba
Contributor III
Contributor III
Author

Hi David - Sorry to bother you again!

This is what happens:

when I do the following:

--------------------First scenario---------------------------------

Section Access;

LOAD * INLINE [
ACCESS, USERID, SA_LINK,OMIT
USER,OPERATIONS\IZHURBA,16
USER,OPERATIONS\IZHURBA,18
USER,OPERATIONS\ACUNNINGHAM,30
USER,OPERATIONS\VSHULZHENKO,33
];

Section Application;
LOAD * INLINE [
SA_LINK,InsurerGroupName
16,Liberty Mutual
18,Sedgwick
108,City of Chicago
33,PMA
30,Galagher Bassett
];

IT WORKS!! But , inconvenience of having change the script every time when a new user is added!

--------------------------------------------------------Second scenario-------------------------------------

When I change it to-->

Section Access;

LOAD
    Access,UserID,SA_LINK,OMIT
FROM [lib://DataReductionSA (operations_izhurba)/DataReductionSA.txt]
(txt, codepage is 28591, no labels, delimiter is spaces, msq);


Section Application;

LOAD  SA_LINK,INSURERGROUPNAME
FROM [lib://DataReductionSA (operations_izhurba)/DataReduactionLink.txt]
(txt, codepage is 28591, no labels, delimiter is ',', msq);

Then it thru the error saying that field Access is not found!

Here is a copy of my notepad:

Access,UserID,SA_LINK,OMIT

USER,OPERATIONS\IZHURBA,16

USER,OPERATIONS\IZHURBA,18

USER,OPERATIONS\ACUNNINGHAM,30

USER, OPERATIONS\AAHRENS, 30

USER,OPERATIONS\VSHULZHENKO,33

I even wrap fields'  names into " (double quotes)

It still thru the error.

-----------------------------------------Third scenario-----------------------------------

Section Access;
LOAD
    @1,
    @2,
    @3,
    @4
FROM [lib://DataReductionSA (operations_izhurba)/DataReductionSA.txt]
(txt, codepage is 28591, no labels, delimiter is ',', msq);

Section Application;
LOAD
    @1,
    @2
FROM [lib://DataReductionSA (operations_izhurba)/DataReduactionLink.txt]
(txt, codepage is 28591, no labels, delimiter is ',', msq);

Data loaded successfully, but access to app view is denied.

I really appreciate your help with this!!

~inessa.

DavidŠtorek
Creator III
Creator III

Hi,

I think that problem is here "...

FROM [lib://DataReductionSA (operations_izhurba)/DataReductionSA.txt]

(txt, codepage is 28591, no labels, delimiter is spaces, msq);"


You should load your txt file like this (based on what you stated that contents your file)


LOAD

    "Access",

    "UserID",

    SA_LINK,

    OMIT

FROM [lib://plocha/New Text Document.txt]

(txt, codepage is 28591, embedded labels, delimiter is ',', msq);

Actually how do you paste your script? Are you using guide in data load editor? It will help you to paste the correct script

Capture.PNG

inessa_zhurba
Contributor III
Contributor III
Author

Hi David - thank you very much! I was able to solve the issue when insert the script from the data load editor and change the "Fields Names" to "Embedded Filed Names" rather that typing it in.

It worked!

Related issue - (when you have a chance) -  security works for myself and one other user that setup as RootAdmin in Qlik. User that setup as a ContentAdmin - can not see anything even she should have access to a certain entry.

Should it be a different ACCESS entry for this user? I tried everything. It doesn't work with inline code in Section Access as well as text file entry.

Thank you again!

DavidŠtorek
Creator III
Creator III

Hello,

glad to help.

Regarding your issu.Only users mentioned in your section access will have access to app (it does not take into account user roles). So if you not mention user who is RootAdmin than this user will not have access at all. To grant access to app ad users to you section access list. And by the way do not forget to add INTERNAL/SA_SCHEDULER

Access,UserID,SA_LINK,OMIT

USER,OPERATIONS\IZHURBA,16

USER,OPERATIONS\IZHURBA,18

USER,OPERATIONS\ACUNNINGHAM,30

USER, OPERATIONS\AAHRENS, 30

USER,OPERATIONS\VSHULZHENKO,33

USER,OPERATIONS\<YourUser>,<value accessible for user>

ADMIN, INTERNAL\SA_SCHEDULER, *


If you want to grant full access to somene use ADMIN access level. For details see https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/Scripting/Security/manage-security...