Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Passing url parameter to a variable

I am trying to pass an url parameter to a variable. Has anyone been successfull doing that?

I've read a lot on these forums about this and most come up with something like this:

http://server/QvAJAXZfc/opendoc.htm?document=myDocument.qvw&host=host&number=test3

where 'number' is the name of the variable and test3 is the value to be stored in it.

Do I need some priviliges on server for this? I'm using QlikView 11.

Any help or pointers are greatly appreciated.

Thanks,

Halli

5 Replies
Miguel_Angel_Baeyens

Hi Halli,

Can you use the QVP protocol instead? If so, create a variable vParameter1 in the QlikView document, Settings menu, Variable Overview, Add.

Then use the qvp url

qvp://yourserver/Document.qvw?vParameter1=ABCD

When you access your document using that url the vParameter1 variable will be populated with "ABCD".

Hope that helps.

Miguel

Not applicable
Author

Thank you for this.

Would it work reloading script through qvp protocol?

In sudo:

On parameter1 change:
     Do Reload();

Does it make sense? I want it to take a parameter and reload, when it does that it should create a qvd document named after parameter input.

Thank you.

Miguel_Angel_Baeyens

Hi,

No, reloads will not run in a Server environment. You can create a EDX task or do using the QEMC, but the document will not triggers macros that make reloads. I have not tested, though, that if you make that variable to trigger an external .BAT file that does the reload...

Hope that helps.

Miguel

Not applicable
Author

Hi, I have tried using the command prompt(cmd.exe) for this to work and it does. The other solution would just be 'better' in practice I think, but meh

Example for future references:

"C:\Program Files (x86)\QlikView\qv.exe" /r /vnumber=31 /vtest=test "\\server\devdocs\createDocOnLoad\make.qvw"

Will open the make.qvw file set the variables "number" to 31 and "test" to 'test' and reload the script with those values.

Thank you Miguel for all your help.

Halli

Not applicable
Author

Hi,

What shell i do to accept de QVP protocol?

Thanks!