Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
vikasgupta
Creator
Creator

Diasplay image as info

Hi Everyone

I wants to load the images from images folder using bundle info load but without making .csv file of name and Image path detail for example

Code             Image name

-----------        -------------------

DM-001       DM-001.JPG

DM-002       DM-002.JPG

DM-003       DM-003.JPG

DM-004       DM-004.JPG

here first list box  is coming from data base and second is list of images in the folder with same name. I review the source code of President application but scenario is different bcz here million are records so making .CSV file is difficult so plz suggest any alternative method to display the image.

Thanks

Vikas Gupta

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Nirav

I think you will get a better response if you start a new thread for your question.

Have you set the text box representation to Image?

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

7 Replies
SunilChauhan
Champion II
Champion II

Bundle

load

     Code          ,

   Image name

from Path.

in text box  write

= info(Code)

hope this helps

Sunil Chauhan
Not applicable

Hi,

If you have the image names exactly as same as the codes, you could generate image names inside the script using something like this:

Load *,

Code &'.'&'JPG' as ImagePath

from.......;

and subsequently use a text object or a list box to display images by setting the Representation to Info as Image in object properties.

Hope that helps.

Regards,

-Khaled.

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

You could build the table dynamically by looping over the files like this:

For Each vImage in FileList('C:\Qlikview\Images\*.png')

          Let zLabel = SubField(SubField(vImage, '\', -1), '.', 1);

 

          Images:

          LOAD '$(zLabel)' As Code,

                    '$(vImage)' As ImageName

          Autogenerate 1;

 

Next

Now the file path name is in ImageName and the filename without path and extension in the Code field. Adjust the location in FileList and change to the correct field names.

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
vikasgupta
Creator
Creator
Author

Thanks Jonathan !!!!

It's working 🙂

nirav_bhimani
Partner - Specialist
Partner - Specialist

HI Jonathan,

If I want to show the listbox selected image in the textbox object then how it is possible using your code which you gave for script.

I am writing the following code in text object but it doesnot work.

=if(count(distinct [ImageName]) = 1, info(ImageName), 'Please Select an Image to View')

here ImageName is absolute path of that image.

So please help me for the same.

Thanks & Regards,

Nirav

jonathandienst
Partner - Champion III
Partner - Champion III

Nirav

I think you will get a better response if you start a new thread for your question.

Have you set the text box representation to Image?

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
nirav_bhimani
Partner - Specialist
Partner - Specialist

HI Jonathan,

Yes I did that.

I have also created one new thread for the same with attachment file. So please have a look on that.

How to show the listbox selected image in the textbox object ?


http://community.qlik.com/message/278853#278853