Qlikview Open URL

I was recently asked if Qlikview could open up a Web Page URL.  It seemed simple enough, add a link to a text box and move on.  However, the next question was how can you specify which page to open.  In other words, give the user options on selecting different Web Page URLs.  This prompted a little more thought, which led me to the following solution.  There are probably many different ways to setup this functionality, so I will show you how I went about it.

From Qlikview Help:  In Qlikview, you can assign “Actions” to certain objects like buttons, text objects, gauges or line/arrow objects.  These actions include launching an external application or exporting data from your Qlikview application.  Once you choose the “Add Action” selection from the Actions tab of your object, you have a number of selections to choose from.  Depending on the action, different parameters for the action will appear.  The actions you choose will be executed in the order which they appear in the list.  Each action will require different parameters, depending on what you select.

In this post, I will demonstrate how to open the ESPN website that contains NFL football stats.  Further, I will setup an input box so the user is able to choose which stats page they would like to view on ESPN (passing, rushing, receiving, etc.).  The actions to Open URL will be added to a button object.  I will also show you how to disable the message prompt that confirms your choice of action.

How to implement a Qlikview Open URL:

Here are the steps to accomplish this task:

Step 1 – Under the Settings menu, select “Variable Overview”

Qlikview Open URL

Create two variables by clicking “Add” and typing in the name of each variable.  Name them “vPage” and “vPageURL”

After you create variable “vPageURL”, add the following text in the “Definition” box:

Qlikview Open URL

Copy the text below and paste it into the “Definition” box

 Step 2 – Add an Input Box object to your Qlik app, then go into Properties

Qlikview Open URL

In the General Tab, select variable vPage as the Displayed Variable

Qlikview Open URL

In the Constraints tab, select the “Predefined Values in Drop-down”  radio button option in the Value List section.  Then, check the “Listed Values” box and put in desired drop-down range (in Predefined Values section).  For this example, I have the following list:

 

 

Qlikview Open URL

 

Step 3 – Add a Button object to your Qlik app, then go into Properties.  In the “Actions” tab, select the following:

Qlikview Open URL

In the “URL” box, type in

=vPageURL

Also, check the box “Open in same window”

Qlikview Open URL

Step 4:  Setup two text box objects and assign the variables created above to display in each text box.  I set these up so the user knows exactly which web page is being selected and the URL which will be opened once the button is clicked.  Here is an example of how to setup a text object to read value of chosen variable:

Qlikview Open URL

Now that you have everything setup, here is what your objects should look like:

Qlikview Open URL

If you select a different page from the “Select a Page” input box drop-down menu you created, you will see the text box objects change to reflect your selection:

Select “passing”

Qlikview Open URL

Now your objects should look like this:

Qlikview Open URL

Click the button “Open Web Page”.  You will see a message box prompt like the following:

Qlikview Open URL

Click on “Yes” and the web page should now open!

Qlikview Open URL

If you want to disable the message box prompt when the user clicks the “Open Web Page” button, you can uncheck the “Confirm Launch from Macro” box in the Security tab within User Preferences Menu:

Qlikview Open URL

Conclusions

By using this technique, the user is now able to select which web page URL the button action will open, giving them a little control over which web page they would like to view!

 

Additional Content

Check out more examples by visiting my Home Page

Here you will find topics covering  Qlikview  SQL Server  Excel VBA

 

Leave a Comment