Dev Space

Customize and extend the power of Alteryx with SDKs, APIs, custom tools, and more.

Issue with a conditional statement inPython with value taken from a check box

nshapir2
7 - Meteor

I have a flow where we have a checkbox and it become either True or False depending on when its checked. That value is fed to a variable in python called

 

toggle

 

I have a script that says 

 

if toggle == True:

else:

 

sometimes when Toggle is True it read as toggle being False. I find that switching to:

if toggle: 

else:

 

 

fixes it temporarily but then after a few runs that breaks and I have to revert back. What am I doing wrong here? 

I have a little output file that outputs the value of the toggle variable in excel it comes up as True when I have it checked and False when its not checked.

 

How can I fix this?

2 REPLIES 2
TheOC
15 - Aurora
15 - Aurora

hi @nshapir2 

Can you please attach your workflow / a scaled down version of your workflow identifying the issue?

Cheers,
TheOC


Bulien
nshapir2
7 - Meteor

Sure. @TheOC  See attached.

Thank you