Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have table documentsTable
idDoc, Sum, Date, idUser - these are columns. I make this table in qvd format for example.
So how can i do, that user login in qlikview - and if his idUser = 1 than he can see reports and documents which are only with idUser = 1 from table documentsTable? Some kind of authorization.
section access; //Start the section access part
//
//LOAD [USERID],
// [PASSWORD],
// [ACCESS],
// [GROUP];
//SQL SELECT USERID, PASSWORD, ACCESS, [GROUP] FROM [admin].[Logins];
LOAD [USERID],
[PASSWORD],
[ACCESS],
[GROUP]
FROM
(biff, embedded labels, table is ????1$);
section application; //End the section access part
LOAD
Subject as [GROUP]
, Object as SK_Employee_ID;
SQL SELECT Subject, Object FROM [admin].[EmployeesACL];
Now logins info in two sources: table [admin].[Logins] and excel.
When I load from excel(uncommented code) it's ok.
When I try to load the same data from [admin].[Logins](commented code)
It loads also the same number of rows - all login users.
But when I try to login in qlikview - it ask's me userid 3 times. And then fails.
Password step - wasn't reached. I can Only login as Admin - first row in grid.
So what could be the problem? If the grid id identical in excel and in [admin].[Logins];
Also loading from [admin].[EmployeesACL] in section application is ok..
What the problem could be?
Is it possible to have any problem with the connection to the database so your information may be incorrect (using a different charset)? If you use a tablebox to display all info from the database (commenting the SECTION access line) does it look fine?
i.ve comment section acces and i've got table logins - it looks fine. no problems are seenig. All data loads in this table. so it is ok.
Evgeny,
Try loading inline, just for testing purposes, two different non admin users plus an admin with the same values you have in your database and check whether you can access properly.
Backup your file before changing the section access.
Select
idDoc
, case when InRoute = 1 then 'yes' else 'no' end as InRoute
from docJournal
Hello Miguel, can u say, if is some analog of case operator in qlikview load script?
Hello Evgeny,
Depending on what do you want to get, you can use either a if() conditional (one value) or a match(multiple values) clause.
If(InRoute = 1, 'Yes', 'No') AS InRoute, If(Match(InRoute, 1, 2, 3) > 0, 'Yes', 'No') AS InRoute2
Hope that helps.
Hello, Miguel!))
I'm trying do the query with two joins, but it fails:
select * from docjournal as dj
left join Orders as o on o.id = dj.OrderId
left join Sales as s on s.id = dj.SalesId
Does it fails becaus in qlikview two joins not allowed?
If that, what solution could be?
Thank u)
Hi Evgeny,
First of all, make sure that your sql statement works and returns some results in your database. Take into account that fieldnames are case sensitive in QlikView. Your script should work doing something like
LOAD *; SQL SELECT * FROM docjournal AS dj LEFT JOIN Order AS o on o.id = dj.OrderId LEFT JOIN Sales AS s on s.id = dj.SalesId
Regards.
P.S.: I'd suggest you to open a new thread with your new questions so more people is available to help you
Dear Miguel!
Please help me, i forget, how to write set expression. I got table , with field IsVisited.
I must do a staticticks box or chart, which counts all yes, all no's and Count(yes)/Count(no's).
Ho to write it? )))
Hello Evgeny,
Do something similar to
Count({< IsVisited = {'Yes'} >} PersonID) / Count({< IsVisited = {'No'} >} PersonID)
Hope that helps