Alteryx designer Discussions

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

if statement

Highlighted
Asteroid

Hi Family, 

 

Why wouldn't this work?

 

if [SEC Question] = "" or

if [SEC Question] = "None, the entity is neither an SEC registrant /FPI nor a Canadian Reporting Issuer."

then "Non-SEC"

else "SEC"

endif

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner
There's an extra If in your statement

if [SEC Question] = "" or

[SEC Question] = "None, the entity is neither an SEC registrant /FPI nor a Canadian Reporting Issuer."

then "Non-SEC"

else "SEC"

endif

Cheers,
Highlighted
Comet

Hi @AuditPro13 

 

remove the second stated "if" and it should be okay.

to be :-

---------------

if [SEC Question] = "" or

[SEC Question] = "None, the entity is neither an SEC registrant /FPI nor a Canadian Reporting Issuer."

then "Non-SEC"

else "SEC"

endif

---------------

Regards,

Aidan

Highlighted
Asteroid

Thank you bruv!

 

For some reason its still not working though. Its returning all SEC when there are blanks (or [NULL]) and "None, the entity is neither an SEC registrant /FPI nor a Canadian Reporting Issuer."

 

Any clue what it could be?

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner
Try

if IsEmpty(Trim([SEC Question])) or

[SEC Question] = "None, the entity is neither an SEC registrant /FPI nor a Canadian Reporting Issuer."

then "Non-SEC"

else "SEC"

endif
Highlighted
Asteroid

Getting closer!

 

The blanks are now showing Non-SEC but None, the entity is neither an SEC registrant /FPI nor a Canadian Reporting Issuer. is still showing SEC.

 

Any ideas?

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner
The string is too long and probably there's a character mismatch.

I'd advise you to use keywords on this string and the function Contains instead of matching the full string.

Contains(SEC Question, "None"), for example
Highlighted
Asteroid

Thank you again! Hope you have a wonderful weekend Thableaus.

Labels