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

Text output formatting

Ash_dsz
6 - Meteoroid

Hi All,

 

I am stuck on the below part of my canvas and it would be great if anyone has any method to generate the below mentioned output.

The below is just an example of the data that I am stuck on and you can consider it as an input as well.

 

Tax_0Data_0FullPath
Tax=0 C:\Users\Downloads\Tax + ".txt"
A112,A114 C:\Users\Downloads\Tax + ".txt"
 Data=0C:\Users\Downloads\Data + ".txt"
 A113,A115C:\Users\Downloads\Data + ".txt"

 

Basically the desired output should generate in a text format without the quotes and also in different folders that i have mentioned above. Just an example of the desired output.

 

In folder C:\Users\Downloads\Tax the required output is .txt is

Tax=0

A112,A114

 

In folder C:\Users\Downloads\Data the required output is .txt is

Data=0

A113,A115

 

Currently in the canvas output when i use .csv and try to generate this output I'm stuck on the following pointers .

1. If the first line is a delimiter there will be quotes. But i need  to make sure that my first line is a delimiter without the quotes in. (I have tried parse and formula tool as well but I'm not sure if its working for me.)

2. Also  for Data folder output i am getting a ( , ) before the data.

 

Thanks,

Ash.

 

 

12 REPLIES 12
Jean-Balteryx
16 - Nebula
16 - Nebula

Hi @Ash_dsz ,

 

I'm not sure to understand what you want ! Are you looking to get the files Tax.txt and Data.txt to contain both two rows ?

Ash_dsz
6 - Meteoroid

Hi @Jean-Balteryx,

 

Im looking to have the file tax.txt to contain only the tax column and the file data.txt to contain the data column.

 

Jean-Balteryx
16 - Nebula
16 - Nebula

Can both information (tax and data) be in the same column ?

Ash_dsz
6 - Meteoroid

@Jean-Balteryx
Basically my input is something like the below table

Tax_0Data_0FullPath
Tax=0 C:\Users\Downloads\Tax + ".txt"
A112,A114 C:\Users\Downloads\Tax + ".txt"
 Data=0C:\Users\Downloads\Data + ".txt"
 A113,A115C:\Users\Downloads\Data + ".txt"

 

And my output should be .txt and should look like the below.

 

In folder C:\Users\Downloads\Tax the required output is .txt is

 

Tax=0

A112,A114

 

In folder C:\Users\Downloads\Data the required output is .txt is

 

Data=0

A113,A115

Ash_dsz
6 - Meteoroid

No. So basically i want the tax column to be in the tax output path and the data column to be in the data output path.

 

Right now in my canvas  im getting quotes ('') in the data output which i do not want. If i click the "Quote output field" as "never" it gives me an error stating delimiter should not be the first line, but unfortunately my data requires the delimiter (=) to be in the first line.

atcodedog05
22 - Nova
22 - Nova

Hi @Ash_dsz 

 

It would possibly not work. Because value is A112,A114 where comma is a possible delimiter. There is no way for the system to get to know that comma is not a delimiter if quotes are not used.

 

If comma is not there in the column data your workflow will work.

Ash_dsz
6 - Meteoroid

Is there a way to remove the comma that the output tool generates before the quotes in the data folder? 

atcodedog05
22 - Nova
22 - Nova

Hi @Ash_dsz 

 

My suggestion would be to do something like below.

 

Workflow:

atcodedog05_0-1632137403298.png

 

Hope this helps : )

 

Jean-Balteryx
16 - Nebula
16 - Nebula

I think @atcodedog05 's solution works best for your use case ! If you have a new file/column, you'll need to add a new filter/select/output combination.

Labels