Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
cody_summers
Contributor II
Contributor II

AD Lookup - DocumentName()

Good afternoon everyone,

I was curious if anyone might have some insight on an issue we're experiencing. We're looking to come up with a method to report AD group info to end users in a text object in access point, based off the AD group being used in the distribution section of the QMC task. This works for QVWs that have a 1:1 relationship between SourceDocuments and UserDocuments. When we have a source QVW that is being used with a multitude of tasks (and therefore multiple QVWs in access point), it does not. I can come up with a method to report all of the associated QVWs in access point to a specific SourceDocument, but management would prefer for a 1:1 relationship. I notice that DocumentName() relates the information of the UserDoc once the app is published in access point, but in the load script it appears to only work with the SourceDocument name. I'm assuming this a limitation of DocumentName(), but I'm curious if anyone might have any other thoughts on solving this issue (if its even possible).

I have added my script below, this will basically be pulled into all of our company's QlikView reports as part of an include .txt file we're already using with our standard variables. Any advice or guidance would be greatly appreciated, thank you!

SET vDocName = DocumentName();

TMP:
LOAD
      [Source Doc Name]
      [User Doc Name]
      [AD Group]
FROM
[..\..\ADLookup.xlsx]
Where [Source Document Name] = $(vDocName);


NoConcatenate
Temp:
     Load Concat(Distinct ' | ' & 'Dashboard: ' & [User Doc Name] & ' | | ' & 'AD Group: ' & [AD Group] & ' | ', Chr(10)) as [AD Group]
Resident TMP;

Let vAD = peek('AD Group', 0, 'Temp');

Set vDocADName = 'Please request access to ' & DocumentName() & ' by going clicking this message and requesting access to the following: ' & '$(vAD)';

Drop tables TMP, Temp;

1 Reply
Brett_Bleess
Former Employee
Former Employee

By chance have you checked out the Governance Dashboard application?  That might get you what you need, or you may be able to pick through the script there to see if you can find something that may work for you.  About the best I have on this one.  

The only other place to pull things would be from the QVPR files, but the trick is learning all the keys between the files etc.  It is doable, as I have it down pretty well these days, but for a newer person, it may seem a bit daunting, but that might work as well, potentially.

QVPR is in C:\ProgramData\QlikTech\ManagementService\QVPR by default.  The Governance Dashboard reads from these as well.  Oh, the Governance Dashboard app is on the Download site just FYI.  Hopefully one of these may help you get to where you are trying to go.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.