I am using process flow to build a fixed field .txt file. Several of the fields require a specific number of spaces because no value is being passed. In SQL it is quite easy to use space(10) for a field with 10 spaces. How can I do this in an Assign node maybe with javascript? I have tried the addtrailingspaces(" ", 10  but the spaces appear as %20%20%20... instead of true spaces. Using " " is out of the question because the header and trailer require over 2,000 spaces each.
Thanks for the help!
/************************************************************ Function: addTrailingSpaces(String varValue, int finalLenthOfVarValue, isSpaceEscaped) Purpose: returns the String with trailing space escape chars to be used while attaching a variable in form URL. Can also be used to add actual space characters instead of the escaped space char by passing false for the argument isSpaceEscaped. If the 3rd argument is not passed at all, space will be escaped and then added. ************************************************************/ function addTrailingSpaces(varString, finalLengthOfVarString, isSpaceEscaped) { var retVal = "" var currLengthOfVarValue = varString.length; var leadingSpacesLength = finalLengthOfVarString - currLengthOfVarValue; var leadingSpacesStr = ""; var spaceChar = "%20"; if(isSpaceEscaped==undefined) isSpaceEscaped = true; if(!isSpaceEscaped) spaceChar = " "; for (var i=0;i