Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.

Alteryx Designer Desktop Ideas

Share your Designer Desktop product ideas - we're listening!
Submitting an Idea?

Be sure to review our Idea Submission Guidelines for more information!

Submission Guidelines

Suggestion: Edit documentation page, "Contains" function

My employer just started with Alteryx, so I'm sure after a few months, this will be basic simple, but I'm sure I'm not the only person who has made this mistake, so there you go...

 

I was running a larger workflow that ends with outputting a table with about 80 columns.  Everything was working fine, except for one column, which kept coming up as all 0s.  Took me a while to find it, but the error all traced back to an error I made with a "Contains" function in a Formula node.

 

The Alteryx "Contains" function takes two arguments, 'string' and 'target'.  I interpreted this as 'find this string in this target variable', and entered two arguments: the string of characters I was looking for first, and then the name of the column I wanted to search in second. 

 

I think I had this backwards.  You need to enter the column name first, then the substring you want to look for second.  So the column name is the 'string' and the search term is the 'target'.  Me getting these reversed did not produce any errors or warnings, which I understand (e.g. maybe you might want to pairwise search for the text in one column in the text of another).

 

I think the terms 'string' and 'target' are kind of vague labels in this case (in Excel, for example, the analogous "Search" function takes the arguments 'find_text' and 'within_text', which is a lot harder to misinterpret).  So I would suggest changing the argument names in Designer and the online documentation, or at least adding text to the Alteryx Documentation (https://help.alteryx.com/2019.2/Reference/Functions.htm) that clarifies which is which.

 

Normally, I'd say this is a pretty minor thing, but since this is a potential 'silent error', I'd argue it's worthwhile.

 

(Also, the online documentation seems to imply there is a "CaseInsensitive" argument you can pass to "Contains", however I don't think there actually is.  May want to edit that for clarity.)

 

Thanks!

 

1) Contains function.PNG

 

 

4 Comments
jpoz
Alteryx
Alteryx
Status changed to: New Idea
ChrisTX
16 - Nebula
16 - Nebula

Good idea.  The names of function parameters could be significantly improved to be more intuitive.

 

The Examples on the Functions page usually help:

  Contains('123ABC', 'ABC') returns TRUE

 

https://help.alteryx.com/current/Reference/Functions.htm

 

patrick_digan
17 - Castor
17 - Castor

I agree that this group of functions should have the help docs (and even the context tips in the formula tool) updated to be overly clear about which is which. I think this would apply to other string functions that have multiple strings like Replace, replacefirst, Findstring, Startswith, endswith.

AlteryxCommunityTeam
Alteryx Community Team
Alteryx Community Team
Status changed to: Accepting Votes