Find exact String in a Concatenated String
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello everbody,
I am fairly new to alteryx and have currently run into a problem with my workflow.
Basically I need to check users for actions. If they can do that they cannot do this.
I concatenated each users action into a long string. Then i am checking the actions (concatenated string) if they contain certain actions. If there is a match then the user has actions that they should not have.
The problem is right now i am using a contains function: Contains([Concat_Value], [ListOfActions]) and this is giving me an inaccurate output since
there are values in the Concat_Value that have the string of an action in ListOfActions.
Example:
concat_value : i go skiing, i go swimming, i go skiing
listofactions: i go, xxx, xxx
This gives me a hit. The user has conflicting actions but they actually do not since it is not an exact match.
It then matches: I run -> Conflicts with -> I go , although the user has i go skiing witch is then possible in this example. Only if the user has the action "i go" then it would be a conflict.
Basically how can i look for the exact string?
Thank you in advance!
Cheers
- Labels:
- Developer Tools
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @dinh_rsm,
I think this is what you want?
I do a split to rows before doing the check - this way your Contains-Function works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello everybody,
thank you for your input.
I tried it with your suggestion christina_h but i could not get it to run. I think the problem is that the ListofAction has 2 columns which indicate. If you have Action1 You cannot have Action2. I included a screenshot of the current flow.
Before the Join:
In the upper bracket. The rows are like Name, Value( which is the action), Concat_Value (a string of actions a user has).
The lower bracket is the action list which the rows are basically Action1, Action2 (If a user has a certain action1 they cannot have a certain action2).
The contains function : Contains([Concat_Value], [ListOfActions]) as stated above gives me matches although the string is not exactly the same. Example with "I go" and "I go swimming". I get a hit for I go swimming although the string is "I go".
I hope this makes things clearer.
Thank you for the help!
 
