Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

3 conditional images

I want to show 3 different images in a qlikview document. i have the data of images in my model (Img#., Image location, image name)

The 3 conditions:

  • image 1 need to be shown when there is no selection made in a row (listbox).
  • image 2 need to be shown when there is a selection made in a row (listbox)
  • Image 3 need to be shown when there is no selection possible in a row (listbox)

Thanks a lot.

1 Solution

Accepted Solutions
rphpacheco
Not applicable

Re: 3 conditional images

Try is expression

if(GetPossibleCount([SPEC Version]) < 1,'qmem://<bundled>/BuiltIn/cross_r.png',

if(GetSelectedCount([SPEC Version]) > 0, 'qmem://<bundled>/BuiltIn/check_g.png',

'qmem://<bundled>/BuiltIn/check.png'

)

)

6 Replies
rphpacheco
Not applicable

Re: 3 conditional images

Could you post an example for better understanding?

Not applicable

Re: 3 conditional images

Image 1:

1.jpg

No selection made need to give result:
unselected.png

Image2:

2.jpg

Selection made need to give result:

selected.png

Image 3:

3.jpg

No selection possible need to give result:

unable.png

A bit the same then the LED selection style, but that gives me design issues. thats wy i'm looking for this kind of solution. Thanks

dagomezl
Not applicable

Re: 3 conditional images

Hello, try is expression

if(isnull(GetFieldSelections([SPEC Version])) and GetPossibleCount([SPEC Version])>0,'No selection made need to give result:',If(GetPossibleCount([SPEC Version]) = 0,'No selection possible need to give result:','Selection made need to give result'))

rphpacheco
Not applicable

Re: 3 conditional images

Try is expression

if(GetPossibleCount([SPEC Version]) < 1,'qmem://<bundled>/BuiltIn/cross_r.png',

if(GetSelectedCount([SPEC Version]) > 0, 'qmem://<bundled>/BuiltIn/check_g.png',

'qmem://<bundled>/BuiltIn/check.png'

)

)

Not applicable

Re: 3 conditional images

I think you didnt get the question:

it need to give the result as the image. not the sentence a "text object" image to be correct.

Not applicable

Re: 3 conditional images

Thanks a lot! with some small adjustments this seem to work

=if(GetPossibleCount([SPEC Version]) < 1,'qmem://img#/2',

if(GetSelectedCount([SPEC Version]) > 0, 'qmem://img#/3',

'qmem://img#/1'

)

)