Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Action Tool - Split to rows

Mario36
8 - Asteroid

Hi, I am using a 'Text Box' Tool to input multiline data. I want to know how the Action Tool can be configured to split this data into multiple rows. Currently, they are being embed within the same line.

Mario36_1-1624369748770.png

 



Mario36_0-1624369692351.png

 

18 REPLIES 18
DawnDuong
13 - Pulsar
13 - Pulsar

Hi @Mario36 

I think what you need is actually the "Text to Columns" tool, set to "Split to rows" and use the action tool to set the delimiter(s) of your choice if you want the choice of delimiters to be set by users instead of being a static / fixed choice.

Dawn.

 

Split to rows.PNGSetting delimeter.PNG

apathetichell
20 - Arcturus

just attach a text to columns \n delimiter split to rows after the text box.

2021-06-22 (1).png

2021-06-22.png

  

 

See attached.

Mario36
8 - Asteroid

@DawnDuong  & @apathetichell 
Can this be done without the Text to Columns tool ?
I am looking for a method where the split happens on the Action Tool. I did try a RegexReplace on the formula but didn't seem to work.

So, my Text Tool Input and Action Tool output should be :
a
b

c

d

 

and not 'abcd'

DawnDuong
13 - Pulsar
13 - Pulsar

The action tool does not allow you to fundamentally change the number of rows in a dataset.

There are only a few tools that can change the number of rows (or records) ^-^ 

For your use case, i cannot think of a solution that does not involve Text to Column tool or some form of Regex tool (which allows you to split into rows under the "tokenise" settings.

If your choice of delimiters is fixed, you don't even need the interface tools (Text Box and Action). The Interface tools allow you to make your workflows dynamic but it does not do any "functional change" to your data.

Cheers.
Dawn.

apathetichell
20 - Arcturus

I'm not sure why you wouldn't use the text to columns tool after it gives you exactly what you want and is incredibly straight forward.

 

As far as other solutions - the action tool recognizes numrows as part of [Destination] and I haven't been able to edit this but perhaps @danilang can chime in? Likewise he would be knowledgeable on the ability to do what you want with the "edit raw XML" options where you add a carriage return directly to the .xml.

DawnDuong
13 - Pulsar
13 - Pulsar

hi @Mario36 

I re-read your question again, probably I misunderstood what you were asking for.

Are you asking about allowing the user to key in "Enter" or "NewLine" in the Text box tool right and somehow pass in that to the Text input tool?

If this is the case, actually what you are looking for is an actual example. Click on the TEXT BOX interface tool, you will see a hyperlink "Open example". I attached here for your convenience.
Dawn.
Dawn.

Mario36
8 - Asteroid

The reason why I don't want to use the 'Text to Columns' tool is

1. I want to explore an alternative as this is an easy solution and I wanted to configure the Action Tool directly rather than using another tool

2. The Action Tool has to be connected to a Macro which I built and I intentionally did not include a Control Parameter. Hence, the input would have to come in from the Action Tool and the entry of a Text To Columns Tool or a Text Input Tool is blocked

 

I reached out to @danilang via a Private message, but yeah Dan, please share your thoughts.

Mario36
8 - Asteroid

You got that right,

Text Box Tool gets fed with multiline data > This goes into a Macro I built 

For now, lets consider the Macro to be a Text Input Tool and this has to be the only tool, no tools before or after apart from a Browse Tool

 

So, the multiline text currently flows through the Action Tool and then to the Text Input Tool, my data is output one below the other but in a single cell / row.

I am looking for a way to configure the Action Tool so that the multiline text from the Text input Tool gets split into multiple rows and is output on the Text Input Tool on multiple rows / cells.

 

I totally agree with your suggestion to use a Text To Columns tool to split to rows, but I am looking for a solution to skip this tool and configure within the Action Tool.

 

Hope that clarifies.

DawnDuong
13 - Pulsar
13 - Pulsar

Maybe i'm just confused.... not sure why the Action Tool has to be connected to a Macro and what it has to do with a Control Parameter. Do update us if you find a solution from a more technical guru 🙂

Labels
Top Solution Authors