Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Retain the Leading Whitespace

JayMarie
6 - Meteoroid

Hi,

 

I would like to ask if there is a possibility to retain the leading whitespace after doing the (RIGHT[String, length) without apostrophe on both ends. This happens when I open the output in Notepad (TXT file). Hope you could advise on this.

 

Thank you.

 

 

4 REPLIES 4
atcodedog05
22 - Nova
22 - Nova

Hi @JayMarie 

 

It might be possible can provide any sample data and expected output.

JayMarie
6 - Meteoroid

After I tried doing the format below, I encountered an apostrophe on both ends as I open the output in Notepad (txt file). I did not click the Data Cleanse because I want to retain the leading whitespace but the result did not meet the requirement. Kindly advise on this. Thank you.

 

Jay13_0-1601059234024.png

Jay13_1-1601059265813.png

 

danilang
19 - Altair
19 - Altair

Hi @JayMarie 

 

Is the output a csv fie?  If so the quotes are automatically added to ensure that the whitespace is captured and any fields with commas do not get split.  You can turn this off by setting Quote Output fields to Never in the config options of the output tool

o.png

 

Be aware, however, if any of your fields contain embedded commas, removing the quotes will cause any program that reads the file to error since one of the rows will have a different number of fields than the others since the embedded comma will cause the field to be split in 2.

 

1,"some, text",12 gets split into 3 fields because of the quotes.  1,some, text,2  will be split into 4 fields since the quotes are not there to denote that some, text should be treated as a single field

 

Dan

JayMarie
6 - Meteoroid

Hi @danilang,

 

Thank you for the advise.

My query has been resolved.

 

Jay

Labels