Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Creating a dynamic URL with Fields values

Hi, I am new to QlikView and am trying to find a method of displaying an image within a text object based on a URL which is dynamically constructed using field values. For example I have tried to create an expression using a field 'Serial_number'. If I construct the url as a straight string with values it display ok but a soon as I try to replace the values with the field values it does not.

 

 

='http://mysite.myimages.co.uk/imagestore/Titles/0' +

left(chr(Serial_number),3) + '00/0' + chr(Serial_number

) + '-FC8.JPG'

Any help would be much appreciated.

Tags (1)
1 Solution

Accepted Solutions
MVP
MVP

Re: Creating a dynamic URL with Fields values

Have you tested the outcome of the string e.g. in a text box?

I just noted that you are using chr(SerialNumber), probably to convert a number to a string.

You don't need this (and I believe it will not return what you want), try removing the chr()

4 Replies
MVP
MVP

Re: Creating a dynamic URL with Fields values

The string concatenation operator in QV is &, not +, so try this:

='http://mysite.myimages.co.uk/imagestore/Titles/0' & left(chr(Serial_number),3) & '00/0' & chr(Serial_number) & '-FC8.JPG'

Not applicable

Re: Creating a dynamic URL with Fields values

Still not working with the ampersand I'm afraid. It does work with the following

 

http://mysite.myimages.co.uk/imagestore/Titles/032400/032496-FC8.JPG but not with the above.

MVP
MVP

Re: Creating a dynamic URL with Fields values

Have you tested the outcome of the string e.g. in a text box?

I just noted that you are using chr(SerialNumber), probably to convert a number to a string.

You don't need this (and I believe it will not return what you want), try removing the chr()

Not applicable

Re: Creating a dynamic URL with Fields values

Now works by removing the CHR.  Many thanks.

Community Browser