QlikView Section Access from Database with SQL request
I am new to QlikView and I have a problem to make the section access for my board. I saw everywhere that section access uses anLOAD [col_name1, col_name2] INLINEsyntax, with generally the columns ACCESS, USERID and PASSWORD stocked in an external file, like an excel file.
The thing is, in my project the access to certain datas of the board has to be authorized based on the data in the tableprofileof my database. Thatprofiletable contains an ID, a name, a firstname and a personnal_number. And so, the people who have a personnal_number registered can have access to the whole board, while the people who don't have a personnal_number should only see some data (which istreatmentof the columnevent_natureof the tableevent).
So, when opening the board, the user should be asked his name and firstname, and then QlikView will look into the database to see if he has apersonnal_numberregistered or not.
My question is: I have absolutely zero idea how to do this.
I started this little code but it's obviously uncomplete, and probably false too...
Load Upper(name) as NAME,
Upper(firstname) as FIRSTNAME,
Upper(personnal_number) as PERSONNAL_NUMBER,
Upper(event_nature) as NATURE;
name as NAME,
firstname as FIRSTNAME,
personnal_number as PERSONNAL_NUMBER
event_nature as NATURE
Can anyone help me please? First to correct this code and second to tell me how to tell QlikView that the access is based on the personnal_number and the event_nature?
Hello, and thank you @PadmaPriya for your answer. I managed to get access from y database. Now when my user tries to connect to the board:
if he is an ADMIN, he enters his USERID which is his personnal_number and I added a column password, so he also has to enter his password.
if he is an USER, he should leave the USERID prompt window empty and only enter his password.
But I still have a problem: When I try to connect with my ADMIN account, who has a * for the data (and should see all the data) I can only see some of the data (the one already present in my table for other users). So my question is: how can I say that I want my admin to see absolutely every value available for this column?
Here is a screenshot of my table:
And my code for the section access is:
Upper(ACCESS) as ACCESS,
Upper(USERID) as USERID,
Upper(PASSWORD) as PASSWORD,
Upper(NATURE) as NATURE;
access_level as ACCESS,
matricule as USERID,
user_pwd as PASSWORD,
nature as NATURE