Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI Friends,,
I really need your help. I thought an error was in lookup(). which I changed and it was running fine. until I removed a comment from section access and section Application line and tried to reload app in QMC. it simply fails.... I fail to replicate issue as in Qlikview this works fine. Qliksense throws tantrums. please help.
//Section Access;
Temp_Access
Load
'User'as Access,
Group,
GroupName,
Upper(Group)&'\'&Upper(GroupName) as USERGROUP,
objectCategory,
objectClass,
DistinguishedName,
// subfield(subfield(DistinguishedName,'=',4),',',1)as Entity_Code,
"cn" as UserID,
Upper(Group)&'\'&Upper(GroupName)&'\'&"cn" as User,
displayName as [Name]
FROM [lib://QVD/Raw\Active Directory\028_Raw_Active_Directory.qvd]
(qvd) where Group='GrpB' or Group= 'GrpB';
Load
'Admin'as Access,
Group,
GroupName,
Upper(Group)&'\'&Upper(GroupName) as USERGROUP,
objectCategory,
objectClass,
DistinguishedName,
// subfield(subfield(DistinguishedName,'=',4),',',1)as Entity_Code,
"cn" as UserID,
Upper(Group)&'\'&Upper(GroupName)&'\'&"cn" as User,
displayName as [Name]
FROM [lib://QVD/Raw\Active Directory\028_Raw_Active_Directory.qvd]
(qvd) where Group='GrpA';
Authorization:
Load
Access,
Group,
USERGROUP,
UserID,
User
Resident Temp_Access;
Drop Table Temp_Access;
//Section Application;
//NoConcatenate
Reduction:
Load * INLINE [
USERGROUP, Entity_Code
GrpA\GROUP-A, A
GrpB\GROUP-B, B
GrpC\GROUP-C, C
];
Trace 'Autorization Loaded';
*************************** I replaced that witjh this new small piece of code and it works fine**********
let vUser= SubField( SubField(OSuser(),';',-1),'=',-1);
let vEntity = Lookup('Entity_Code','UserID',SubField( SubField(OSuser(),';',-1),'=',-1),'Reduction');
Trace '$(vUser)';
Trace '$(vEntity)';