Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have been trying to connect the tags done in the qmc with the section access in app
and have done the following so far but it keeps giving me unknown error so far every time I am trying to connect with the app
any suggestions what I am doing wrong?
LIB CONNECT TO 'QSR';
LOAD 'USER' AS "ACCESS",
UserDirectory&'\'&UserId AS USERID;
[Users]:
SELECT "UserId",
"UserDirectory"
FROM "public"."Users";
INNER JOIN "Users":
LOAD Tag_ID,
User_ID;
[TagUsers]:
SELECT "Tag_ID",
"User_ID"
FROM "public"."TagUsers";
INNER JOIN "TagUsers":
LOAD ID,
Name AS _SERIALNUMBER;
[Tags]:
SELECT "ID",
"Name"
FROM "public"."Tags";
Section Access;
LOAD * Resident "Users";
Load * Inline
[ACCESS,USERID,_SERIALNUMBER
USER,BI\nohas,6159
];
Section Application;
Thanks in advance
thank you for replying I actually was able to find a solution which is
let vQvdRoot='lib://QVDRoot/';
let vQvdSource='lib://QVDSource/';
$(Include='$(vQvdSource)ConsumeAppLoadInit.txt');
LIB CONNECT TO 'QSR';
[UserSecurity]:
LOAD Upper('USER') as ACCESS, Upper(UserDirectory & '\' & UserId) as USERID, Upper(Name) as _SerialNumber;
SQL Select "T"."Name", "U"."UserId", "U"."UserDirectory"
From "public"."Users" "U"
inner join "public"."TagUsers" "TH" on "U"."ID" = "TH"."User_ID"
inner join "public"."Tags" "T" on "TH"."Tag_ID" = "T"."ID";
Section Access;
Load * Resident UserSecurity;
Section Application;
Star is *;
if NoOfRows('UserSecurity')>0 then
drop table UserSecurity;
end if
$(Include='$(vQvdSource)ConsumeAppLoadInit.txt');
I think the problem was with the txt file has to be entered twice
I have not done this my self but there is a blog post on a similar concept using custom properties
BI Review: Row-level access in Qlik Sense using custom properties in QMC
thank you for replying I actually was able to find a solution which is
let vQvdRoot='lib://QVDRoot/';
let vQvdSource='lib://QVDSource/';
$(Include='$(vQvdSource)ConsumeAppLoadInit.txt');
LIB CONNECT TO 'QSR';
[UserSecurity]:
LOAD Upper('USER') as ACCESS, Upper(UserDirectory & '\' & UserId) as USERID, Upper(Name) as _SerialNumber;
SQL Select "T"."Name", "U"."UserId", "U"."UserDirectory"
From "public"."Users" "U"
inner join "public"."TagUsers" "TH" on "U"."ID" = "TH"."User_ID"
inner join "public"."Tags" "T" on "TH"."Tag_ID" = "T"."ID";
Section Access;
Load * Resident UserSecurity;
Section Application;
Star is *;
if NoOfRows('UserSecurity')>0 then
drop table UserSecurity;
end if
$(Include='$(vQvdSource)ConsumeAppLoadInit.txt');
I think the problem was with the txt file has to be entered twice