Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
alisonpwallis
Creator
Creator

How do I show images on selection by the user?

Hi,

I am trying to load student images into a dashboard so when the user selects the ID for that student, the image appears. I have bundle loaded a table in script with two fields - first the ID which then joins to other data within the dashboard and secondly a field containing the filepath to the image. The load appears to work but I cannot get the text object to show the photos:

I create a text object, put in the code

=info([Student ID])

and change the Representation to Image. I also set it to be conditional so it only shows when just one Student ID is selected. This just shows '-' rather than the image. However, if I go into the expression and select images from the tabs at the bottom, I can select 'Student ID/' from the Image Folder drop down list but then it just lists all the images for me (and I can see them) but they don't appear in the text box. I want to just see the image depending on the selected Student ID.

The thing that seems to be missing is something like 'qmem' - this appears in all the other examples I've found when you look a the text object properties BUT I can't get this to change anywhere.

Can anyone help?


Thanks

Alison

16 Replies
Anonymous
Not applicable

Hi,

Check this sample attached file

hope it helps!! !

awhitfield
Partner - Champion
Partner - Champion

No Problem,

can you post the section of the screen that you run for the bundle load, and the expressions page from the chart properties?

Andy

alisonpwallis
Creator
Creator
Author

Hi Andy

Sorry for the delay. I was trying out something.

I've attached the screenshot of the load - the commented out section is how i was originally loading the files in using SQL. I tried creating an excel file with the images in and that didn't work. The next thing I tried was renaming the field in the bundle load so it wasn't a key with an existing field (seems like it needs to be an orphan?) And this worked! But without joining it to the other data it is not so useful - it means users will probably have to select the ID twice - once for most data and once for the photo.

Any ideas?

Thanks


Alison

santiago_respane
Specialist
Specialist

Hi,

try bundle load as follows.

In script:

bundle load * inline [

imgName,img

img1,C:\Temp\srespane\Education\QV Samples\Infographics\img1.png

img2,C:\Temp\srespane\Education\QV Samples\Infographics\img2.png

];

Then in your text object you will need to add the desired image as follows (don't forget to set Image as value forRepresentation in text object properties General tab):

='qmem://imgName/img1' //For image 1

='qmem://imgName/img2' //For image 2



Please let me know if this helps.

kind regards,

alisonpwallis
Creator
Creator
Author

Hi

I saved the file and closed it and opened it again and it appears to now be working. Not sure at all why this is the case but lets hope it stays that way.

Thanks for your help


Alison

awhitfield
Partner - Champion
Partner - Champion

Nice one!

santiago_respane
Specialist
Specialist

Hi, if your issue was solved please remember to mark the answers that helped you as Helpfull or correct in order to close the issue.

Kind regards,