Hello Everyone,
I have an requirement i tried to solve it but i am unable to do it, Your help or guidance is much appreciated.
I want to restrict the no of character in specified cell and if no of character is less than the standard number alteryx should add N no of spaces to meet that no of characters.
Example :
Standard No of character for cell A1 is 12
A1 contains date as "LAWRANCE" its only 8 character so it should add 4 spaces and output should be like "LAWRANCE "
Hope you understood my requirement, Can anyone support me to find the solution pls.
Regards,
Lawrance Ayyamperumal
Solved! Go to Solution.
Its working as expected, Thank you. i will read more about the this function.
Hi Esther,
Its not adding space wherever numeric character is present , is there any other function available to increase the space in numeric cell ?
one more difficult is if the cell is null its not writing any white space its simply ignoring cell
Regarding the numbers, PadRight (and PadLeft) only work on text. So, you can convert the columns to text with a select before the function tool, or you can use PadRight(tostring([Field]),12," ")
Alteryx doesn't process nulls through formulas, so you'd have to substitute something else for the null first. Perhaps something like this?
If IsNull([Field]) THEN " "
ELSE PadRight(tostring([Field]),12," ")
Let me know if that helps.
Cheers!
Esther
Hi Esther,
i have tried adding select tool to change the data type as my 1st step but it didn't work i have tried the syntax you shared but even that its not adding space.
for NULL its working fine, Any suggestion for numeric field ?
Hi Esther,
by any chance did you get time to look into my request ?