Free Trial

Alteryx Designer Desktop Discussions

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

IF Statement

RedaS
5 - Atom

Hello:

 

I cannot get this IF statement to work. I believe it has to do with the data type for the Geo Code data. Any suggestions?

6 REPLIES 6
Hub119
11 - Bolide
11 - Bolide

@RedaS I'm guessing the first record in your dataset does not have "CT" in the State Code field.  That is why the Geocode field appears to be staying the same as what you have already established in the above formula.  Try running your workflow and check to see if the records associated with a "CT" State Code have actually been updated, as the formula as written should work.

RedaS
5 - Atom

@Hub119 I double check and the State Code contains "CT". 

When I run the workflow, it returns warnings Invalid type in operator ==.

atcodedog05
22 - Nova
22 - Nova

Hi @RedaS 

 

Your formula should be something like this

 

IF [State Code]="CT"
THEN "07000000"
ELSE [GeoCode]
ENDIF

 

Hope this helps : )

Hub119
11 - Bolide
11 - Bolide

Misread that... @atcodedog05 is correct, you need to remove the "[Geocode]=" part of your formula as that is already being referenced.

RedaS
5 - Atom

Thank you, it worked!

atcodedog05
22 - Nova
22 - Nova

@RedaS Happy to hear that :)

 

Can you mark response as solution. So that this post gets marked as solved.

 

Happy to help : )

Cheers and have a nice day!

Labels
Top Solution Authors