Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
cbushey1
Creator III
Creator III

QMS API GetUserDocuments - relative path missing

Hi there,

New to using the QMS API so bare with me. 

We are already using the GeUserDocuments function to return a list of documents, however we recently instituted publisher and added mounted folders. Since doing this, the relative path value is missing for our documents. Is there a way to correct this or possibly another way to identify the path of the file (we use the path for a list of documents in our own custom site)?

I used the powertools utility and am attaching what it returns (for a single application).

Labels (4)
18 Replies
NadiaB
Support
Support

Hi @cbushey1 

Do you have a basic sample of your code, just the connection to the API and the GeUserDocuments call?

Could you also provide a sample of the expected result vs the current result?

Kind regards.

Don't forget to mark as "Solution Accepted" the comment that resolves the question/issue. #ngm
cbushey1
Creator III
Creator III
Author

@NadiaB  - I don't think you really need that to recreate my scenario. 

All I did was point the powertools utility at my QMC server and called the GetUserDocuments function. This returned a list of documents on my server, however the path to where those documents are stored was omitted from the relative path field. Regardless of my code, the powertools showed the same result. 

In situations where the document has the same name, "SomeApplication.qvw" I need to be able to identify what unique path exists for each document and the relative path provided that.

NadiaB
Support
Support

Hi @cbushey1 

Could you please confirm this was working before?

If so could you provide the following information?

*In what QlikView version

*what is the folder structure where is expected to get a relative path. ( a basic sample can be provided)

Unfortunately we do not support the PowerTools but if this was working before in your code and stopped working , if I can reproduce we can file a product defect investigation.

 

Kind regards.

Don't forget to mark as "Solution Accepted" the comment that resolves the question/issue. #ngm
NadiaB
Support
Support

Hi @cbushey1 

I did a quick test in 12.4 and the API is returning a relative path:

api12.4.PNG\

I'm not applying any filters to the DocumentNode List.

I used the following documenation to verify when is expected the relative path, I didn't find the details in the documentation for 12.4 but it should be the same:

https://help.qlik.com/en-US/qlikview-developer/12.1/apis/QMS+API/html/M_PIX_Services_V12_Api2_IQMS2_...

Kind regards.

Don't forget to mark as "Solution Accepted" the comment that resolves the question/issue. #ngm
NadiaB
Support
Support

Hi @cbushey1 

I just tested the PowerTools, the RelativePath it's also available there:

QMS_PowerTools.PNG

 

 

 

Don't forget to mark as "Solution Accepted" the comment that resolves the question/issue. #ngm
NadiaB
Support
Support

Hi @cbushey1 

Did the provided information resolve your questions, if so, could you mark the post as "Accepted Solution"

Thank you.

Don't forget to mark as "Solution Accepted" the comment that resolves the question/issue. #ngm
cbushey1
Creator III
Creator III
Author

Sorry for the delay. 

From what I can tell, you followed the same steps I am however you have a value in the relative path where I do not. The only thing I can think of that is different is I have mounted folders where the applications live. Can you try that and see if you can replicate?

NadiaB
Support
Support

Hi @cbushey1 

Did you have the chance to look at the documentation ?

https://help.qlik.com/en-US/qlikview-developer/12.1/apis/QMS+API/html/M_PIX_Services_V12_Api2_IQMS2_...

The relative path is shown when there are subfolders in the User Documents folder:

User Documents\

User Documents\Sales

User Documents\Finance

So for the posted question, the QMS API is working as designed.

If you have a code where you are getting different results depending on the QlikView version you were using before, it will be necessary to open a case request and provide the code and the scenario so we can replicate.

Kind regards.

 

Don't forget to mark as "Solution Accepted" the comment that resolves the question/issue. #ngm
cbushey1
Creator III
Creator III
Author

I looked at the document however I am not an expert in web development. I didnt write the code we have but happy to get someone to review. I already have a case open and unfortunately was told they were nothing they could do without involving consulting services (not a great support answer). If you would like to look at my case it's 01714385. 

I asked my web guy to send me the code we use, that still works in other environments that are also on 12.40, and I am pasting it below. 

 

public static List<DocumentNode> GetExistingQVDFileNames()
       {
           var nodes = new List<DocumentNode>();
           var backendClient = new QMSClient();
           ServiceKeyClientMessageInspector.ServiceKey = backendClient.GetTimeLimitedServiceKey();
           var serviceList = backendClient.GetServices(ServiceTypes.QlikViewServer);
           foreach (var server in serviceList)
           {
               var userDocs = backendClient.GetUserDocuments(server.ID);
               var includedDocs = userDocs.Where(docNode => !String.IsNullOrEmpty(docNode.RelativePath) )
                   .Where(x => x.IsSubFolder == false && x.IsOrphan == false && !(x.RelativePath.Substring(1,1) == ":") ); // ...and does not begin with a drive letter
               nodes.AddRange(includedDocs);
           }
           return nodes.OrderBy(n => n.Name).ToList<DocumentNode>();
       }