Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

thnkgreen
Contributor

Show/Hide image based on Listbox value selection

Hello everyone.  I was wondering if it is possible to show/hide an image based on the value selected in a listbox.  If so, would someone please explain??  Thank you

1 Solution

Accepted Solutions
jagannalla
Valued Contributor III

Re: Re: Show/Hide image based on Listbox value selection

Hi,

Please find attached file.

8 Replies
giakoum
Honored Contributor II

Re: Show/Hide image based on Listbox value selection

You could add an action on the list box field, that would update a variable based on selection. Then you could use that variable in the show/hide condition of the image.

datanibbler
Esteemed Contributor

Re: Show/Hide image based on Listbox value selection

Hi thnkgreen,

sure it is possible. With almost every type of chart or object, you can define a condition for visibility, usually on the "layout" tab of the properties_dialog.

Use the GETFIELDSELECTION([field]) function to query the selection the user has made in a specific field.

HTH

Best regards,

DataNibbler

gopalopsharma
Contributor

Re: Show/Hide image based on Listbox value selection

Hello green,

one way to do this is to create a text object, insert the image as background and then create the layout expression.

Hope this helps..

nilesh_gangurde
Valued Contributor

Re: Show/Hide image based on Listbox value selection

hi,

its possible.

it the layout tab select Conditional and put following expression.

if(ListBox_FieldName = 'ABC',1,0)

-Nilesh

thnkgreen
Contributor

Re: Show/Hide image based on Listbox value selection

Gopal, the layout expression is the portion that I am having trouble with

sundarakumar
Valued Contributor II

Re: Show/Hide image based on Listbox value selection

Please find the attached app.

Go to document properties and set trigger for the field you want  as shown below

post.PNG

now the value u want ie the selection is in the variable , use the variable in the layout tab of the chart like

if($(a)='name you wish to comapre',1,0)

-Sundar

jagannalla
Valued Contributor III

Re: Re: Show/Hide image based on Listbox value selection

Hi,

Please find attached file.

kiranmanoharrode
Contributor III

Re: Show/Hide image based on Listbox value selection

Hello thnkgreen,

          Take a Text Object insert background image instead of Color.

         go to layout tab in Show make it conditional put 'getselectedcount(yourfieldname)>0'

it will solve your problem

Regards

Kiran

Community Browser