Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
jasonseril
Creator
Creator

pass parameter (sheet) in url

Good day to all,

Is it possible to pass parameter (the name of sheet) in url, so that when qvw document is opened in AP, the specified sheet will be opened. thanks in advanc e.

jason

19 Replies
disqr_rm
Partner - Specialist III
Partner - Specialist III

Yes very well possible. You would create a variable in your document and fill this variable passing parameters in the url for this variable. Then "On Open" macro you would read this variable contents and activate the sheet you want. Make sure to wipe the contents out in the same macro, and put a check in the begining to make sure variable is not initial.

Hope this will help.

jasonseril
Creator
Creator
Author

Thank you very much Rakesh. Do you have a sample application for this?

jason

deepakk
Partner - Specialist III
Partner - Specialist III

it doesnt workin in Qlikview 9 using Access point.

Please share you view on this.

Not applicable

1. Create a variable in your Document and set the value to 0.
2. Create this procedute:

Sub WhenOpen

set v = ActiveDocument.GetVariable("vSheet")
ActiveDocument.Sheets(v.GetContent.String).Activate

End Sub


3. Create a Trigger OnOpen on Document Event Triggers to run the procedure.
4. The url is qvp://localhost/MyApp.qvw?vSheet=0, where vSheet is an array. So your first sheet is 0, the second is 1...

tseebach
Luminary Alumni
Luminary Alumni

Hi,

There is a difference between doing this in Ajax and IE/Desktop. For the Windows Desktop & Plugin versions you can use the qvp:// protocal to pass a parameter. This would look like: qvp://servername/document.qvw?var=1&var=2

If you use Ajax, the only way I've been able to this is via bookmarks. If you select Remember Layout state in a new bookmark, then it will show the sheet you were on when it was created. And you can the reference the bookmark in the url by appending: &bookmark=Document\BM01

You will need to do a bookmark for each sheet you want to reference.

The bookmark method will also work in IE.

Support for setting variables via http urls would be really nice...

Regards Seebach

amien
Specialist
Specialist

Thanks Torben!

Anonymous
Not applicable

@Torben Seebach

your tip works only if you creat a shared bookmark using the access point, but if you will creat a bookmark in the document using a desktop client it doesnt work.

arieidel
Partner - Creator II
Partner - Creator II

You can access directly to a specific sheet of your QVW by using de parameter "sheet" in the URL, like this:

http://servername/QvAJAXZfc/opendoc.htm?document=MyApp.qvw&sheet=MY_SHEET

Where MY_SHEET is the ID of the Sheet you want be open.

Regards,

Ariel

salto
Specialist II
Specialist II

As far as I know, Rakesh's solution is correct. I am using it in some of my reports, with the desired results (a trigger in the "On Open" event that activates the sheet).

Regards.