community
cancel
Showing results for 
Search instead for 
Did you mean: 

Engine Works Blog

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

Here at Alteryx we have an internal mailing list called the Round Table. It is a place where anyone in the company who has an Alteryx question can reach out and ask? other employees. The question goes to everybody on the mailing list and anyone who knows the answer or has a suggestion can reply. I think it is an invaluable tool and we have seen some interesting questions and answers. So much so that I think they would be useful to Alteryx users in general.

 

So in this series of blog posts I am going to present the best questions and answers that we have seen on the Round Table. I invite you to test your Alteryx knowledge by seeing if you can answer the questions without reading the answer; or simply to learn something new that you didn't know about Alteryx.

 

I have reworded a lot of the questions, replies and examples to make them a more friendly format for the blog, so apologies in advance to everyone whose words and modules I have changed. Also I'm not crediting individuals who posted questions and answers, I'll just say that there are many of you; thank you; and you know who you are.

 

So on to the questions!

 

The example modules can all be found at the end of this post.

 

Question 1: Is it possible to embed hyperlinks in reports?

Answer: Yes, but only if your report is output in html format. This is the only format which will support hyperlinks. Then this is achieved by using a Report Text tool in expert mode with something like this:

<a href="http://www.alteryx.com">Click Here to Visit Our Website</a>

Example Module: RoundTableP1Q1_HyperLinksInReports.yxmd

 

In Alteryx 7.0 hyperlinks will be supported in all document formats which support hyperlinks.

 

Question 2: Is it possible to insert data from Alteryx into an existing Excel spreadsheet for a range of specific cells? For Example, B4-G4 on Sheet1?

Answer: Yes you can.

If you have data in an Excel worksheet and select some cells, right click and say Define Name.

This will create a pointer in the Excel file for a certain name. (eg ‘OutputLocation’)

In Alteryx you can use a normal output to xls file with the table name being the same as the selected range eg.

Output.xls|OutputLocation

Where OutputLocation is the name of the defined range.

Example Module: RoundTableP1Q2_InsertIntoSpecificExcelLocation

 

 

Question 3: Using the REGEX tool The CHARFROMINT("$1") doesn't return anything but "$1" returns a number!

Answer: When you use a function inside another, the inside one gets evaluated first. So CharFromInt("$1") returns null because the string “$1” isn’t an int, and so the third argument to REGEX_REPLACE is null.

 

If you just pass “$1” as the third argument, that’s a valid replacement pattern, and REGEX_REPLACE replaces the matched pattern with the first marked expression.

 

Question 4: So I have an input file with XML style accented characters; (if I can’t do the above) how do I convert them to the characters they represent?

 

(For those of you playing along at home the data looks like this:

 

That is everyone's favourite café

 

And we want to convert é into a accented e. But the difficultly is that there could be any number of different escaped characters which need to be replaced. Clue: CharFromInt(233) gives you the character you need, you just need to work out how to get it into your input data.)

 

Answer: The solution is to extract all of the escaped characters which we can find in our input; create a lookup table which converts them to their equivalent character; and then a find and replace tool to insert them into our data.

 

Example Module: RoundTableP1Q4_ConvertingXMLEscapedCharacters.yxmd

 

Question 5: Is it possible to connect to FTP/SFTP via Alteryx?

 

Answer: Yes. Ron House has a post on his blog discussing the process here:

 

Alteryx FTP Get Wizard, or Conversations with Margarita

 

Also check out Margarita Wilshire?'s module on the module exchange here:

Automate the upload of a file(s) to your ftp site

 

Question 6: I’m looking for non word characters using regex. Curious as to why the regex_match and regex_replace seem to be working differently. In the Match the space appears to be ignored. In the replace the space appears to be considered a non word character. Are these supposed to be handled differently?

 

Example Module: RoundTableP1Q6_RegExQuery.yxmd

Answer: REGEX_MATCH looks at the entire string – so ‘\W’ will only match a string of exactly one non-word character – in your input ‘/’ or ‘#’ or ‘^’. Changing your regular expression to ‘.*\W.*’ would match strings where a non-word character occurs anywhere within the string (‘.*’ representing 0 or more occurrences of any other character).

 

Making that change shows that MATCH and REPLACE both treat a space as a non-word character.

 

You can download the files mentioned here.

Adam Riley
Principal Software Engineer, Tech Lead Core Engines

Adam Riley is a Principal Software Engineer and the Tech Lead of the Core Engines Team at Alteryx. He started on his Alteryx journey as an Alteryx user before joining the company in 2011. He writes a personal blog about Alteryx at www.ChaosReignsWithin.com and is the former curator of the Crew Macro Pack.

Adam Riley is a Principal Software Engineer and the Tech Lead of the Core Engines Team at Alteryx. He started on his Alteryx journey as an Alteryx user before joining the company in 2011. He writes a personal blog about Alteryx at www.ChaosReignsWithin.com and is the former curator of the Crew Macro Pack.

Labels