Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
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: 
miranrai
Contributor III
Contributor III

Opening url using list box

I have requirement to open url when particular value in list box is selected.

List box has following values.

V1

V2

v3

v4

URL http://localhost/QvAJAXZfc/opendoc.htm?document=Examples%2FDemo.qvw&host=QVS%40vcengstrptappd1 should open when V4 value is selected from list box.

Is there any work around for this?

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

You can make the url expression conditional, building on the above suggestions, like

     =Only({1} If(dimension = 'V4', ...... url expression as defined above.....))

     (to display the expression for V4 and hide the others. Only() ensures that row is displayed when a selection is      made)

or

     =only({1} If(dimension = 'V4', ...... url expression as defined above....., ....normal expression))

     (only the valid url expressions will hyperlink)

To colour highlight an expression, based on the selection of the dimension, you will need to add a foreground colour expression to the expression. Click + next to the expression to access the foreground colour setting.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

5 Replies
Gysbert_Wassenaar

Use a straight table with an expression with representation type Link. The kind of expression you need looks like:

='V4<URL>http://‌localhost/QvAJAXZfc/opendoc.htm?document=Examples%2FDemo.qvw&host=QVS%40vcengstrptappd


talk is cheap, supply exceeds demand
petter
Partner - Champion III
Partner - Champion III

2015-05-14 #4.PNG

It can easily be achieved with a straight table where you have just two columns - one expression and one dimension column that you could hide.

You will have to have a table with two fields named Text and Links (or whatever you prefer to call them).

Create the straight table add the text for the link as dimension and as an expression you add:

=Text & '<URL>' & Links

Then select No Totals in Total Mode on the Expression tab (look at screenshot)

Then select for Representation under Display Options: Link ... also on the Expression tab (look at screenshot)

2015-05-14 #1.PNG

2015-05-14 #2.PNG

2015-05-14 #3.PNG

miranrai
Contributor III
Contributor III
Author

Using Link from expression will make all the values in straight table as link. I want only V4 value to be hyper linked and not all. And this straight table should look like list box (value getting highlighted when selected.).

jonathandienst
Partner - Champion III
Partner - Champion III

You can make the url expression conditional, building on the above suggestions, like

     =Only({1} If(dimension = 'V4', ...... url expression as defined above.....))

     (to display the expression for V4 and hide the others. Only() ensures that row is displayed when a selection is      made)

or

     =only({1} If(dimension = 'V4', ...... url expression as defined above....., ....normal expression))

     (only the valid url expressions will hyperlink)

To colour highlight an expression, based on the selection of the dimension, you will need to add a foreground colour expression to the expression. Click + next to the expression to access the foreground colour setting.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
miranrai
Contributor III
Contributor III
Author

Thanks everyone.