Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
There's a text object in my model which has image as a background.
I have got 10 different images which can be used as a background. And I'd like to assign a certain image based on a certain condition.
For instance:
If Var=1, then use image1 as a background,
If Var=2, then use image2 as a background,
If Var=3, then use image3 as a background,
...
For some reason I don't want to create 10 different text objects and show/hide them based on a certain condition. I'd like to have a single text object with the possibility to assign different backgrounds.
Is it possible?
Thank you in advance,
Larisa
Hi,
PFA. This might solve your problem.
Note: Please check variable and variable triggers in document properties, under trigger tab.
Thanks,
Partha Kulkarni
May be try something like this if its an external image we are talking about:
Pick(Var1, Image1, Image2, Image3, ... and so on)
I don't think the background can be manipulated like that.
If you create a text box and place it behind the first (ie in a lower layer) and make the background of the first transparent, then you can use the lower box with a Representation of Image to display the 'background' image dynamically.
Hi Jonathan,
But how can I make the lower box to display the background image dynamically?
As far as I see in the properties of a text-box there's a possibility to select only one image.
I think you can't
because when you can use an expression in Qlik there is something like (...)
and for background image I don't see a way to add an expression
Maybe you can use a chart (for background image) and a text object (for text) overlapping the 2 objects.
For managing images in a chart there is an example President.qvw, usually in
C:\Program Files\QlikView\Examples\Documents
Hope someone can find a better solution.
Hi,
Try like this.
To get images dynamically on a text object.
1. Create a variable with if condition (like if(Country='INDIA','path\Indiaflag.jpg','path\usaflag.jpg') )
2. Create a text object and give expression as =$(Vyourvariable)
and change the representation to image in general tab.
3. Create a list box and switch between values/countries, then you can see dynamic images.
Regards,
Pavan.
Hi,
PFA. This might solve your problem.
Note: Please check variable and variable triggers in document properties, under trigger tab.
Thanks,
Partha Kulkarni
Hi Pavan,
That's a nice idea.
How can I load, say, 50 different images as a separate field on the backfront and assign certain titles for them?
I suppose, if I load them inside the model, I would not need to set a path like: 'path\Indiaflag.jpg'
Thank you in advance,
Larisa
Thanks, everyone!