Alteryx Designer Desktop Discussions

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

if contains elseif troubleshoot

lancegoh1
7 - Meteor

hello,

 

I'm having a slight issue with my expression. can someone please help.

alteryx test 2.png

 

so basically I input the formula tool. And what I planned to have was ' change of bo', 'change of ppo', 'constitutional doc - ownership proof' and 'constitutional doc - ownership proof (cosima)' to have the field [Team2] to be autofilled a text "to check" and the rest as "not asc". however when I ran the workflow, all of the rows in [Team2] were filled as 'not asc'.

 

alteryx couldn't pick up any error within the expression, so I'm just curious as to what went wrong.

 

Regards,

Lance

8 REPLIES 8
patrick_mcauliffe
14 - Magnetar
14 - Magnetar

@lancegoh1I  would try switching the order of your last two conditions.

lancegoh1
7 - Meteor

hi Patrick, I tried to put only 1 condition but expression is still filling the entire field with 'not asc' as shown below.

 

alteryx test.png

 

alteryx test 2.png

 

Regards,

lance

Surendar28
5 - Atom

Hi 

Can u able to share the input!

 

Regards

Surendar.C

cmcclellan
13 - Pulsar

There's nothing obviously wrong with what you've posted, but what does the Input data look like ?  Does it match the exact CaSe That You have SpeCiFied ?

patrick_mcauliffe
14 - Magnetar
14 - Magnetar

Edit: I'd like to change my answer to direct you to the comment below by @harikakummara  That's better than what I originally had.

harikakummara
6 - Meteoroid

Hi Lance,

 

It may be due to "Space" or "text match" issue. For text match issue, try using "Uppercase" function on column "[Doc Code (pre-1P)]" . For "Space" issue, try removing extra white spaces or copy exact text from [Team 2] column.

 

Either ways, it would be better if you can provide a sample of data here.

 

Thanks,

Harika Kummara

kklein12
5 - Atom

Single vs. double quotes?

patrick_mcauliffe
14 - Magnetar
14 - Magnetar

@kklein12  Single vs double doesn't matter as long as you stay consistent in the formula with one exception:

If you're quoting a string which contains a single or double quote, then you must use the opposite to enclose it.

For example if you're searching a text field for the string: It's a string

You would use:

Contains([FieldName],"It's a string")

If you were searching for the string: A "string" in the text

You would use:

Contains([FieldName],'A "string" in the text')

Labels