Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Join us March 10th, 7 Ways Modern Analytics Can Help You Take Smarter Action. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
quriouss
Creator III
Creator 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

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
Creator III
Creator III

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

Yes this idea is smarter than the nested if.


Try :

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

Not applicable

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
Creator II
Creator II

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.