Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Pass a field value to the Regex Tool in an app

warrencowan
9 - Comet

Hi All,

 

I am building an analytic app which has a series of 3 regex tools performing different routines eg a tokenise to rows, pase this, split that etc.

 

I have the statements for these tools in a series of seperate customer specific external settings files (Not an app values settings file) and bring them into the flow as an input subject to the customer we're running the app for.

 

But the regex tool only seems to accept values directly or passed via an action tool. Try as a I might, I can't find a way to pass the values Ive imported into the flow to the tool.

 

I originally tried to isolate the individual fields with the regex statements into their own streams, so I could move the values to the column header and pass them as single values to drop downs via the connected tool option. But this failed because when I change the customer's settings that I wnat to pull in the values for, the drop downs dont refresh to the new imporeted values, unless I rerun the workflow and resave the app, which sort of defeats the object really.

 

Does anyone know a better way to solve this.

 

thanks in advance

 

w

16 REPLIES 16
Dazzerman
11 - Bolide

Hi Dubya,

 

You can do this by creating a Batch macro, with input, output, and Regex tool in between.  Then you can pass a string to the Control Parameter to update the Regex as you wish.

 

I hope this helps.

warrencowan
9 - Comet

thanks @Dazzerman . I'm not sure I'm totally familair with that.

 

I've built batch macros a couple of times, but they were to break down processes that join multiple data sources and thus create massive amounts of in memory data, and in those I was using the control param to process the data in batches. But this sounds like new territory.

 

Do you think you could elaborate.

 

My app process is as follows if it helps to put it in context.

 

Question inputs: input name of customer.

Run Workflow

Step 1. Salesforce input tool....using name of customer as a filter , request to salesforce for fields from customer's settings record (inc the regex expressions). 

Step 2. Dynamic input for main data...brings in customers data using connection and query that is passed in flow from the customer settings.

Step 3. Bunch of various tool steps.

Step 4. Regex tool step... toeknise field xyx to rows based on expression (this is what needs to be changed dynamically with one of the incoming values in step 1.)

Step 5. Formula step...create file path for write out, using settings passed along from step 1.

Step 6. write out to table using file path created above.

 

The goal here is to just specify the client name to then app, and have all externally managed settings and data processed without any further config.

 

 

w

 

 

Dazzerman
11 - Bolide

Hi @warrencowan,

 

I have attached a basic workflow with a macro that I had created to do something very similar to what you're trying to do.

Just change the regex you need in the upper Text Input tool, I have used a simple string in this case, but you should be able to use relatively complicated regex as well.

warrencowan
9 - Comet

Actually you know what @Dazzerman , I've thought it through and given it a try in a small test and I've gotten it to work just like you said it would. 

 

So if im understanding this right, the hard work is getting done in the inner batch macro, and the fields pulled into the outerworkflow are all individually mapped on to control paramaters which can pass through into the batch macro and place values into their respective joined tools.

 

Then the whole outerworkflow is saved as an app?

 

That is a touch if it is?

 

Many thanks @Dazzerman . You've saved me some proper heart ache.

 

 

 

Dazzerman
11 - Bolide

From what I understand of what you're trying to do, that is exactly right!

 

Glad you got what you wanted!  🙂

warrencowan
9 - Comet

and thanks for the sample work flow. I'll use it to check my workings, so many thanks again!

Nandakishore
8 - Asteroid

Hi @Dazzerman ,

 

Connected to this how to dynamically pass multiple Regex expressions and then validate with incoming data using batch macro .

 

Thanks

Dazzerman
11 - Bolide

Hi Nandakishore,

 

I'm not understanding what you're trying to do.  If you have some example data with your desired output, it should be possible to design some code to resolve your query.

 

Cheers!

Nandakishore
8 - Asteroid

Hi @Dazzerman ,

 

I would like to a list of names to undergo multiple regex expressions / validations . For example :

 

String : AAAAAAAA123 and BBBBBB456 will be validated for match against more than one regex expressions . 

 

How to do this through batch macro.

 

Thanks

Labels