In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

Alteryx Designer Desktop Discussions

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

Unexpected syntax error in simple Formula tools

Paul_s_Moody
8 - Asteroid

Hi,

I'm getting a syntax error that is driving me crazy!

I'm assuming I've done something silly, but can't see what...

 

Using A Formula Tool, I've created a Boolean column called [Manual Cat] and populated using the code:

Paul_s_Moody_1-1674828757543.png

 

All seems happy as the colours change...

 

A little later in the workflow, however, I'm trying to use the column to add a new column and adjust the value of an existing column.

I'm using the Paul_s_Moody_2-1674828919651.pngbutton to get the existing columns where appropriate and the formula appear as:

Paul_s_Moody_3-1674828980630.png

The equals signs are generating the errors:

Formula (234) Parse Error at char(17): Invalid type in operator ==. (Expression #1)

Formula (234) Parse Error at char(17): Invalid type in operator ==. (Expression #2)

and the the "True" and existing columns aren't being recognised so stay in the black font.

 

What have I done wrong??

 

I have tried saving the workflow (and then turning Aleryx on and off again...) but no difference.

 

I can't share the workflow as it is using sensitive data and has more than 220 Tools within it (and counting).

 

Thanks in advance...

 

4 REPLIES 4
ShankerV
17 - Castor

Hi @Paul_s_Moody 

 

Can you please check the column [Manual Cat] is Boolean.

 

If it is Boolean datatype, then "True" will  not work.

DavidSkaife
14 - Magnetar

Hi @Paul_s_Moody 

 

Change it from "True" to 1, as you're defining [Manual Cat] as a boolean which is either 1 or 0

ShankerV
17 - Castor

Hi @Paul_s_Moody 

 

As expected, the datatype stored as Boolean.

 

Please use 1 and 0 for True and False respectively.

 

ShankerV_0-1674829500906.png

 

 

Paul_s_Moody
8 - Asteroid

Thank you both!

 

I'm glad it was something simple. As a beginner, I thought that "True" and 1 were interchangeable - especially as I'd populated the column using "True" and "False".

Labels
Top Solution Authors