ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Contains formula returns a -1 when I expected 1 or 0

tstrong
5 - Atom

When using the Contains function, I get a return of -1 when the string is found.  I was expecting a 1 or 0.  Why -1?  

2 REPLIES 2
JosephSerpis
17 - Castor
17 - Castor

Hi @tstrong that is expected this in the documentation for the contain function "Returns the 0 based index of the first occurrence of Target in String. Returns -1 if no occurrence" Link if you want to read more detail about it https://help.alteryx.com/2018.2/Reference/Functions.htm

tstrong
5 - Atom

Thank you

Labels
Top Solution Authors