Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
PepeMontes
Partner - Contributor III
Partner - Contributor III

Mark/Flag a field if contains certain chain characters

Hello All,
I want to mark with a flag if my field "DESC" contain one or more of the  next words:

PALABRA
PRE CORTADA
PRECORTADA
CORTE
DESPERDICIO
SALDO
FALLA
DEFECT
REPARA
RETRABAJO
RE TRABAJO
COMPOSTURA
PARTE

 

For this im trying to set the next "IF" function:

if("DESC"='%PRE CORTADA%' or "DESC"='%PRECORTADA%' or "DESC"='%CORTE%' or "DESC"='%DESPERDICIO%' or "DESC"='%SALDO%' or "DESC"='%FALLA%'
or "DESC"='%DEFECT%' or "DESC"='%REPARA%' or "DESC"='%RETRABAJO%' or "DESC"='%RE TRABAJO%' or "DESC"='%COMPOSTURA%' or "DESC"='%PARTE%',1,0
) as Recorte

But this is not working 😞
Did someone already did something like this before? 
I would appreciate a lot if someone could help me with this.
Regards.

 

JAAM.

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

the operator you want is "like". And you probably want to use "*" as the wildcard. So...

"DESC" like '*PRE CORTADA*'

-Rob

View solution in original post

2 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

the operator you want is "like". And you probably want to use "*" as the wildcard. So...

"DESC" like '*PRE CORTADA*'

-Rob

PepeMontes
Partner - Contributor III
Partner - Contributor III
Author

Thanks for your help Rob, it works too good.

Regards.