2022.1.1.30569 Patch Release Update

The 2022.1.1.30569 Patch/Minor release has been removed from the Download Portal due to a missing signature in some of the included files. This causes the files to not be recognized as valid files provided by Alteryx and might trigger warning messages by some 3rd party programs. If you installed the 2022.1.1.30569 release, we recommend that you reinstall the patch.

Alteryx Designer Discussions

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

Reformat based on data types

UnknownUser
7 - Meteor

Hi, 

 

I'd like to reformat each column based on it's data type to create a fixed width file. So e.g. if it's V_String I'd like to pad spaces to a fixed width of 40. If it's an Int I'd like to transform a "123" into a "0000123" and so on. The output data type of all columns would then be a string.

Any ideas? 

 

Thanks! Felix 

4 REPLIES 4
NickC
Alteryx
Alteryx

Hello,

 

You will want to use the formula tool or the multi formula tool to achieve this.  I have used 2, 1 for the numeric fields and 1 for the string fields.  

padding.png

 

 

 

Workflow attached.

 

Nick

UnknownUser
7 - Meteor

Thanks!

 

Another question: do you know how to specify the goal format in Alteryx?

 

E.g. I'd like to specify that -0.1 is written as "-0000000.10" string.

UnknownUser
7 - Meteor

Follow up question: is it possible to define the format on a more granular level? E.g. for int16 instead of numeric?

ZacharyM
Alteryx Alumni (Retired)

You can throw a Dynamic Select in front of the setup that was outlined above - this tool will let you select at a more granular level than the Multi-Field Tool.

 

https://help.alteryx.com/2018.2/DynamicSelect.htm

Labels