Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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,
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.
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
Yes this idea is smarter than the nested if.
Try :
'http ://image.server/' & Getfieldselections(Fieldname) & '.jpg'
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,
Hi permata,
Write the expression as Stated Below:
>>Go to the Properties of Media Box Extension.
>>and Follow the below Steps.
Thank's & Regards,
Sumit Jadhav.
There is also a solution by using a Container-Visualisation, so without extention 😉
@Miko93 , can you explain a little bit how to do it without any extension, with Container?
Thanks.
you can use Container and insert Image&Text into each container. Based on the Filter pane you are using you can adjust the condition to show for each image. So the container is only showing selected items and therefore only selected images.
If you are interested I can show you a small example
I got it!
A little bit complicated when you have a lot of images (10), but it's the best solution i've found yet.
Thanks for your help!