Alteryx treating single character strings as boolean - when and how to fix it

by David Sánchez

I recently came across an unexpected (for me!) behaviour of Alteryx: I had built a batch macro that was receiving single letter arguments (a-z) in the control parameter, and the macro was working OK sometimes, but not all the time. It took a while to figure it out:

Alteryx interpreted f and t as Booleans, even though they were defined as strings

My workaround consisted on adding an extra character (so aX, bX,…, zX) in the main workflow and a LEFT(field1, 1) formula inside the macro. Download the sample workflows here. And see below a graphic summary.

First workflow

initial alteryx layout with batch macro

Initial layout of the main workflow and the batch macro.

First results: where did this boolean come from?

results showing "f" and "t" being taken as boolean

Initial test within the macro outputs the expected results. As does calling the macro from the main workflow for all the values EXCEPT f and t that are taken as boolean.

Modified workflow: a quick workaround

workaround true false

Workaround adding an extra character (i.e. X) to the value being passed to the control parameter and adding a Left formula inside the batch macro

Avatar

David Sánchez

Some Numbers @DS -- Reflection on 4 (fast) months

3 mins read

Fri 26 Jan 2018

Revelations – densification using bins and Index in Tableau. Case in point: normal distribution.

6 mins read

Sun 14 Jan 2018

Tableau for everyone

1 mins read

Tue 02 Jan 2018

Reflections on Dashboard Week - making quick decisions with insufficient data

3 mins read

Sun 17 Dec 2017