Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
We have in a Qlik Sense application within a table a field with a url. This field is also displayed as url and works within the Qlik Sense application (Feb 2022 Patch1).
Now we distribute this tab as html report within an email (NP May 2021 SR4). There the "link" is no longer displayed correctly. Only the name "Link" is displayed as hyperlink.
I have already tested it with HTML Encode, as well as a formula within the report.
My HTML code is:
<td valign=top height=25 width=150> <a href="%%url_1%%">Link</a> </td>
Does anyone have any other ideas?
Greetings
Hi,
Create a Qlik Sense table as you did:
Hyperlinks:
LOAD * Inline [
Site, URL, Hyperlink
Google, https://www.google.com/, <a href="https://www.google.com/">Google</a>
Qlik, https://www.qlik.com/, <a href="https://www.qlik.com/">Qlik</a>
]
Create the Qlik NPrinting connection and cache as usual then create an HTML template:
I set Show Headers to Hide just for esthetic reasons but you have to remove the Keep Source Format flag to avoid uncontrolled HTML style code in the generated report.
The generic HTML link has the structure (from https://www.w3schools.com/tags/tag_a.asp)
<a href="https://www.w3schools.com">Visit W3Schools.com!</a>
so I generated the second column by building the link using Qlik NPrinting tags
<td><a href="%%URL%%">%%Site%%</a></td>
Instead the third column is made by generating the HTML tag in the Qlik Sense reload script. This keeps very simple the template side
<td>%%Hyperlink%%</td>
Run a report preview
and you will have the HTML code generated in both cases.
Best Regards,
Ruggero
Also, in the load script editor, I wrapped the urls with double quotes, reloaded the NP connection, previewed the your html report in the template editor and suddenly the links worked with your NP report output.
Sites:
LOAD * INLINE [
Site, url
google, "https://www.google.com"
qlik, "https://qlik.com"
];
Thanks @Ruggero_Piccoli for your invaluable input as always!
Hello @Frank_S and @Ruggero_Piccoli
thanks for your effort, great suggestions!
I have taken a closer look at Frank's suggestion. Since the url comes from the source system in a field, the must add the " separately.
My idea was to use the chr(34), unfortunately within QS I get a wrong representation of the url displayed, which of course doesn't work either.
Do I have a thinking error somewhere here?
something else interesting:
when I select, the content is displayed correctly. However, QS does not seem to interpret the link function of the url correctly.
Hi @Danijel
I see...
Well there seems to be alot of discussion around that on the internet
I'll cc @Ruggero_Piccoli in case he has any other ideas on this.
Hi @Frank_S @Ruggero_Piccoli ,
I have tested something else. I have made some progress with the ApplyCodePage function. With this I apparently don't need the " anymore.
Last problem, as soon as I enter a link label, I get the label as a value in NP, if this is left empty, the link is correctly displayed and can be called.
Can anyone of you confirm this?
Not sure what you mean by "as soon as I enter a link label, I get the label as a value in NP"
However what I did notice is that regardless of what I type into the link label field, "link" appears in the email report output regardless of what is typed into the label field.
Also if I leave the field 'blank', Link is still shown in the output.
In both cases the links works whether I use a link label or leave it blank.
Hello @Frank_S
thank you for testing. I have made a short video about this, which again shows my procedure.
I will send you the video via pm.
Hi @Danijel
I wasn't able to find any other alternate solutions despite a concerted effort to do so over the past few days and including today.
Wrapping your urls with double quotes and using 'text' rather than 'link' to represent the url data in the QS app works perfectly.
You also need to deselect 'keep source formats' on the url field.
Here below is representation of the changes I made directly to the app in the QS hub editor. I am also attaching the source file is used.
Kind regards...
Hi @Frank_S
Thank you very much for your effort. I will also test it again and get back to you.
Greetings