Alteryx Designer Desktop Discussions

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

Make a tool dynamic from the datastream

Hiblet
10 - Fireball

I would like to adapt the Regex Parse tool to make it dynamic.  The intention is to pass in the regex pattern from the datastream, either as a column in the data or as a control value somehow.  I have tried experimenting with wrapping the tool in a macro, and then using the Action Tool to try to update the XML, but I cannot get it to work.  Most of the documentation on the Action Tool focuses on interactive user input.  How can I reconfigure the Regex pattern from the datastream?

 

The inbound data would be a text column, and a Regex pattern column.  I would be OK if the pattern was the same for each text string, but I just need to be able to build the pattern from data, rather than have it hard-wired.

6 REPLIES 6
PhilipMannering
16 - Nebula
16 - Nebula

You can use a field with a regex pattern in the formula tool. And that pattern can be as dynamic as you like based on incoming data... I think

 

PhilipMannering_0-1633339927216.png

 

JoeHerbert
Alteryx Alumni (Retired)

Hi @Hiblet if I'm understanding this right I think using the Formula tool & REGEX_Replace could suffice using the 'pattern' field as a dynamic input? 

 

JoeHerbert_1-1633340077307.png

 

 

Christina_H
14 - Magnetar

The above answers might cover what you need, but here's a version using the Regex Parse tool in a macro.

Hiblet
10 - Fireball

Sorry, should have been more specific, I am trying to tokenize the data to extract the matches.

Hiblet
10 - Fireball

Apologies, I am trying to extract the strings that match, to rows, so my wrapped tool would be a Regex Parse set to Tokenize with output as Rows. 

Hiblet
10 - Fireball

Christina's got the solution I needed.  I was trying to get the control parameter from the actual inbound data stream, which is where I was confused.  Thanks for the help!

Labels