Alteryx Designer Desktop Discussions

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

Can someone help me out in finding regex for alphanumeric strings.

Jazzy
7 - Meteor

I need  help regarding these 2 mentioned questions.

 

 

1 - Create a macro that checks whether records of the single string input field, contain only
alphanumeric characters. Macro should create a new field ‘Alphanumeric’ which will have
values as follows:
True – if record is an alphanumeric string
False – if record is not an alphanumeric string.

 

 

2 -  Create an analytic app for question 1. Take input from user in a textbox and determine
whether it is an alphanumeric string or not.

11 REPLIES 11
AngelosPachis
16 - Nebula

Hi @Jazzy ,

 

For question 1, does it necessarily have to be a macro? I believe you can achieve it with a single formula tool, but maybe you want to prevent users from editing the tool.

 

AngelosPachis_0-1609403439504.png

 

The RegEx you are looking for is

 

\w+

 

which will match one or more alphanumeric characters.

 

 

AngelosPachis
16 - Nebula

Regarding question #2, I have converted the previous workflow into an app and it seems to work

 

Macro Example.gif

 

Hope that helps, let me know if you have any questions.

 

Regards,

 

Angelos

 

Jazzy
7 - Meteor

Yes it needs to be in macro..Standard macro is also fine...But instead of formula tool regex tool is mandatory.

AngelosPachis
16 - Nebula

Hi @Jazzy ,

 

Placed the regex tool into a macro and I send it over to you.

 

If you want to lock the macro to prevent user from editing, you can find that under the Advanced Options setting.

 

AngelosPachis_0-1609406823387.png

 

Let me know if it worked for you.

 

Regards,

 

Angelos

 

Jazzy
7 - Meteor

Okay I'll try n let u know..

 

Thanks

Jazzy
7 - Meteor

Regarding this analytic app, I don't have that Update Cell (Default) option in my dropdown..

 

I have attached my workflow below..

 

So, how should I Proceed then ?

Jazzy
7 - Meteor

Also here, even if we enter a string which is not in the input file..it should show the output as true or false.

AngelosPachis
16 - Nebula

Hi @Jazzy ,

 

It's not clear to me what you want to achieve with the app. In my example I was using a Text Input tool, and that explains the reason why I had the option to Update a Cell Value.

 

In the app you have created, you are using a Input Data tool that reads a Text file. Which value out of the 4 contained in your file you would like to update? What would be your desired output?

 

You would like the user to input a string which is not in the input file, but it's unclear to me what you want to happen after that.

Jazzy
7 - Meteor

Regarding that Update Cell(Default) I used text input instead of input data. I am also getting that Update Cell(Default) option in dropdown.  This is sorted now..

 

The main thing which is happening is if I enter a string which is already present in as a record in text input it is updating with the value of first record. In short it is replacing the first record and 2 same string records are showing.

I am attaching a screenshot.

 

I want an analytic app in such a way that even if new string is entered it should not replace it with first record, it should show as a new separate field  in csv file  and also if string is entered which is already present in file it should not create duplicate record.

 

Awaiting for response...!

Labels