Missed the Q4 Fall Release Product Update? Watch the on-demand webinar for more info on the latest in Designer 24.2, Auto Insights Magic Reports, and more!
Free Trial

Alteryx Designer Desktop Discussions

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

IF ELSE STATEMENT WITH LIKE Condition

kathbanc
8 - Asteroid

Hi! 

 

Please help me, what is the syntax for like in IF ELSE Statement. 

 

IF [SLoc] like 'PA%' THEN '234'
ELSE [SLoc] ENDIF

 

This one is error 

 

 

Thank you 

2 REPLIES 2
gawa
16 - Nebula
16 - Nebula

hi @kathbanc 

StartsWith and/or EndsWith function can be used for equivalent statement to LIKE in SQL query.

 

If you want to match the beginning of words, use StartsWith().

StartsWith([SLoc], "PA")

 Or, If you want to match the end of words, use EndsWith(). 

EndsWith([Sloc], "PA")

 

kathbanc
8 - Asteroid

Thank you @gawa it works!! Thank you so much 

Labels
Top Solution Authors