We are aware of an issue with the Search bar. Please use Advanced search for the time being while we troubleshoot. Thanks for your patience as we work on improving the community!

Alteryx Designer Discussions

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

if statement

AuditPro13
8 - 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

7 REPLIES 7
Thableaus
17 - Castor
17 - Castor
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,
Aidan_K
11 - Bolide

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

AuditPro13
8 - 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?

Thableaus
17 - Castor
17 - Castor
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
AuditPro13
8 - 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?

Thableaus
17 - Castor
17 - Castor
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
AuditPro13
8 - Asteroid

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

Labels