Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

quriouss
Contributor III

Load different images dependent on selections?

Is it possible to load different images depending on the selections chosen?

For example, if I click on "Mr Smith", is it possible to display an image of Mr Smith?  Or if I choose "France" can I get a French flag?

Thanks in advance,

5 Replies
Not applicable

Re: Load different images dependent on selections?

Hi,

You have to use the "Media Box" plugin (available on QlikBranch) and use an expression like this for the URL of the images:

if(getfieldselections(FieldName)='Pierre','https://.../image1.jpg',

if(getfieldselections(FieldName)='Paul','https://.../image2.jpg',

if(getfieldselections(FieldName)='Jacques','https://.../image4.jpg',

'https://.../imageForInvalidSelection.jpg'

)))

Best regards,

Xavier.

quriouss
Contributor III

Re: Load different images dependent on selections?

Thanks.  Before I go reading the documentation, do you know if it's possible to use the selection name in the URL?

e.g. something like;  imageURL = http://image.server/[Selection_Name].jpg

Not applicable

Re: Load different images dependent on selections?

Yes this idea is smarter than the nested if.


Try :

'http ://image.server/' & Getfieldselections(Fieldname) & '.jpg'

Not applicable

Re: Load different images dependent on selections?

Hi Xavier,


I am very new in QlikSense and have same query regarding show an image based on selection


If I read the answer, it mention about the expression, may I know where should I put the expression and put the image also?


Thanks a lot


Best regards,

sumitjadhav
Contributor II

Re: Load different images dependent on selections?

Hi permata,

Write the expression as Stated Below:

>>Go to the Properties of Media Box Extension.

>>and Follow the below Steps.

expression111.JPG

Thank's & Regards,

Sumit Jadhav.