Alteryx Designer Desktop Discussions

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

Alteryx not Reading "_" character.

vgeetanp
7 - Meteor

Hello People,

 

I am unable to read the "_" in one of my macro.. Could any one of you help me to identify the defect and help me to fix it ?

Below are the images to explain you clear

 

vgeetanp_0-1607007872011.png

 

The above image is where I am searching a string with "_" and the result is "False" (at the right end of the image)

 

vgeetanp_1-1607007963281.png

The same word is searched in the report without "_" and the result is "True" in this case.

 

I am attaching the sample text file and my macro for your reference.

 

Your help on this is highly appreciated.


Thank you in advance.

4 REPLIES 4
ChrisTX
15 - Aurora

If you only plan to use the CONTAINS function to perform the text search, try using a basic Filter tool in your macro.

 

If you need to use the REGEX tool in Match mode, I think you'll need to clean up the incoming text before using it in your REGEX.  Here's what your example would look like going into your macro, which returns False:

 

Screenshot 2020-12-03 095724.jpg

Chris

atcodedog05
22 - Nova
22 - Nova

Hi @vgeetanp 

 

I think the issue was with the regex tool. I am using contains in formula tool.

 

Here is the modified macro.

atcodedog05_1-1607011218042.png

Outputs:

atcodedog05_2-1607011253112.png

 

atcodedog05_3-1607011282507.png

Hope this helps 🙂 Feel to ask if you have any questions


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

 

vgeetanp
7 - Meteor

Thank you @atcodedog05  for your response.

 

I still face some issue with the macro you shared.

The macro is throwing the result as "True" even if the input does not contain that specific word when there are more than 1 input file in the directory.

 

vgeetanp_0-1607060786504.png

 

I have attached the test file used in the directory for your reference.

 

If you could assist me on this.. that would be really great 🙂

Thanks in advance.

atcodedog05
22 - Nova
22 - Nova

Hi @vgeetanp 

 

Sorry my bad it was issue with file mapping in macro. Fixed it.

 

Output:

atcodedog05_0-1607061431988.png

 

Please check and let me know 🙂

Labels