Alteryx Designer Desktop Discussions

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

Format Variable In Render Tool

bfrost
5 - Atom

I am trying to have a standard width for data from a data column into a Render tool for alignment purposes on the output form.  

 

I am "re-creating" a municipal form for filing purposes, so need to put specific values in specific fields.

 

I am trying to line up all of the "dollars and cents".  

 

Something like Format(000000.00, [Amount]) so that all of the values are right justified.  

 

I do not want the leading zeros for a value that is $  1500.00, but do want the "leading spaces".

 

Please see the attached - Format_A_Variable_Render_Tool_What_I_am_getting.bmp and the Format_A_Variable_Render_Tool_What_I_Would_Like.bmp along with the associated workflow, input data file and Format_A_Variable_Render_Tool.pdf output file.

 

Thank you. 

2 REPLIES 2
DeanWest
9 - Comet

I believe the "format" function you are looking for is called the "PadLeft" function. You can specify how many characters you want to pad the field with. I've created a workflow that will determine the longest length within a value field and use the PadLeft function to "justify" the values to your desired output.

 

Justify-Example_DeanWest.png

 

 

Please let me know if you need any more assistance with this workflow 🙂

 

 

bfrost
5 - Atom

Dean, 

 

Thank you for your idea and reminding me of different ways to get a format - padding.

 

I offer what I think is a little simpler option.  

 

BenFormat_A_Variable_Render_Tool_Done.jpg

 

Format_A_Variable_Render_Tool_What_I_Now_Have.jpg

 

Labels