cancel
Showing results for 
Search instead for 
Did you mean: 

Engine Works Blog

Under the hood of Alteryx: tips, tricks and how-to's.
Creative Director
Creative Director

A number of people have asked how they might embed web links in their Alteryx HTML reports. This is a good task for the Text tool's Expert Mode.

 

Expert Mode is a way for you to custom craft your own PCXML and turn it into a snippet so you can include it in your reports. PCXML is very similar to HTML, although there are some significant differences that I won't get into here. For web links, however, it is essentially identical.

 

For those of you who aren't familiar with what a web link looks like in HTML, here is an example:

<a href="http:\\some.place.on.the.web">The-text-you-see-with-an-underline</a>

 

There are two parts to this. The first is the URL that you want the user's browser to go to when the link is clicked, and the second is the text you want to appear on the screen.

 

So the first thing you need is those two pieces of information. Here is a snapshot of a Text Input tool I used:

 

Text Input.jpg

 

Next, I needed to convert these two things into a snippet. I used a Text tool in Expert Mode for this:

 

Report Text.jpg

 

You should notice a few things:

      • I am using Expert Mode. This means that the content should be treated as actual PCXML, and not text. If I didn't do this, you'd see the <a href...> stuff in the final output and not the link.
      • I manually added the "href="http://" part to the link, since it wasn't in the text coming in.
      • I used both incoming fields to construct the link, so that there would be pretty text displayed.

 

After this tool, I simply dumped the SiteName field and the new Text field (the link) into a Table tool and then a Render tool, rendering to HTML. That's it!

Tara McCoy

Tara McCoy is the Creative Director at Alteryx. Since joining Alteryx in 2004, Tara has held roles in Product Management, Content Engineering, and Community where her focus has always been on delivering an amazing product experience with Alteryx. From designing product icons and community badges, procuring excellent swag, concocting engaging contests, and crowdsourcing content from internal and external Alteryx advocates alike, Tara is dedicated to the Alteryx brand and wants everyone to experience the thrill of problem solving with Alteryx.

Tara McCoy is the Creative Director at Alteryx. Since joining Alteryx in 2004, Tara has held roles in Product Management, Content Engineering, and Community where her focus has always been on delivering an amazing product experience with Alteryx. From designing product icons and community badges, procuring excellent swag, concocting engaging contests, and crowdsourcing content from internal and external Alteryx advocates alike, Tara is dedicated to the Alteryx brand and wants everyone to experience the thrill of problem solving with Alteryx.

Comments
Alteryx
Alteryx

Great article! Another tip to build on this - if you want your link to always open in a new tab, just use target="_blank" in your html:

 

<a href="http://some-place-on-the-web.com" target="_blank">The text you see with an underline</a>

Also, some URL's have ampersands & in them - this will cause an error if used to create a link in the PCXML of the Report Text tool.

Alteryx
Alteryx

Great info, Tara and Alex! If the URL has an ampersand symbol in it, add amp; right after it.

 

For example, say the URL is:

 

https://www.google.com/maps?saddr=80002&daddr=80226

 

 

This will cause an error. Adding amp; after the & will let it output in PCXML correctly. Here's the new URL to use with bolded emphasis:

 

 

https://www.google.com/maps?saddr=80002&amp;daddr=80226

 

 

Fireball
Fireball

 Great Stuff! Thanks for the tip. 

 

Add one more to the 'never thought we'd use Alteryx for' - Converting our xml sitemaps into HTML sitemaps

 

 

Fireball
Fireball

Thanks Tara!

 

File this under, "the user will never know how much easier I just made this for them."

Labels