Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
northerner
Partner - Contributor III
Partner - Contributor III

Document chaining - get absolute server path of a document

Hi,

I have a QVW (Document A) with a button that opens a second QVW (Document B) using an 'Open Qlikview Document' action with a relative path to Document B.  This is working if the user has opened Document A using 'Open in Server' from the file menu.  It does not work if the user opens Document A from a shortcut-style text file (e.g. on their desktop).  I think this is because the relative path in the QVW is different when the file is opened from a shortcut.

I could hardcode the absolute document path in the action (i.e. qvp://servername/folder/Document B.qvw).  However I'd prefer not to do this - the location of the file may be different in each of our environments (dev/UAT/Live/contigency).  Ideally, I'd use a function to get the server path for the current document (Document A) and then use this to generate the full path to Document B.  However I can't find a function that will do this.

I'd be grateful for any ideas on how to get the server path of Document A, or any other ideas for how to solve this.

The users all have the Windows Qlikview client.

5 Replies
Anonymous
Not applicable

relative path should work fine actually with both server and file open. Are you sure you specified it correctly?

northerner
Partner - Contributor III
Partner - Contributor III
Author

Borys - thanks for the reply.

I'm pretty sure that I've specified it correctly.  The document chaining works when I open document A from 'Open in Server' and choose the file from the browser.  I've also tried doing 'Open in Server' using the string from the text file (qvp://servername/foldername/report.qvw) and this also works.  However when I double click the text file the document chaining fails - instead I see an 'Open URL' dialog box.

I've noticed that when I open the document from 'Open in Server', the server path (qvp://servername/foldername/report.qvw) is displayed in the Qlikvew title bar.  When I open from a text file shortcut, I see the location of the shortcut (\\mycomputer\folders\report.qvw@).  I think this is the reason that Qlikview is behaving differently in the two scenarios.

northerner
Partner - Contributor III
Partner - Contributor III
Author

I also forgot to mention: it looks like someone else has also encountered this issue http://community.qlik.com/thread/53576

Unfortunately there's no solution on this thread.

Anonymous
Not applicable

sorry, I misunderstood your question. We always publish our documents to Access Point and use AJAX client only and relative path works that way. And you are trying to use both windows client and AJAX so it might be tricky then.

As a last resort, I guess you can specify a path to your document in external file and include it in your QVW so if you need to change it, you can do that by changing that file only.

there is also Computer() and Server() function, but they would not give a path to a document.

Also you can get a path to a document using macro API but I am not sure if it will work with accesspoint/qvp:

msgbox(ActiveDocument.GetPathName)

Not applicable

Maybe have a look at embedding the servername details into a variable. This variable would be relative to the environment the application is on (so would dynamically change for UAT/DEV/Live etc). Use that when creating the url for document B.

Variable could be a passed on parameter in the reload.

Hope that helps

Joe