Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Hex to ASCII Conversion

amc1794
6 - Meteoroid

Hi Alteryx Community

 

I'm an Alteryx Rookie so am looking for some help on how to get Alteryx to convert Hex to ASCII. By means of example, I would need to make the following conversion:

 

Hex: X'57696e646f7773205365727665722032303038205374616e64617264'

ASCII: Windows Server 2008 Standard


There are tools such as https://www.rapidtables.com/convert/number/hex-to-ascii.html which complete the task however I need to do it within Alteryx. Any help would be greatly appreciated as I have tried the HexToNumber(x) function however this turned the entire statement into a single number.

 

Thanks in advance for your help.

3 REPLIES 3
jdunkerley79
ACE Emeritus
ACE Emeritus

I would do this in three steps

 

2018-12-18_12-01-22.png

 

First break into rows of 2 letters (using the Regex tool to tokenise)

Second Convert each pair to ASCII using formula:

CharFromInt(HexToNumber([Hex]))

Finally, concatenate result to make string

 

Sample attached.

amc1794
6 - Meteoroid

Hi jdunkerley79,

 

Thanks for your help. I have turned the workflow you created into a batch macro however the macro fails when there is any variance in the length of the Hex. Are you able to suggest how to solve this?

jdunkerley79
ACE Emeritus
ACE Emeritus

No need for a batch macro. Just add a record id:

 

2018-12-28_10-28-48.png

 

This allows you to group by recordid and have multiple different length hex string.

 

updated sample attached

Labels