Fixed length record - Plain Text

Posted by Edilberto Mariño Moya on 09-Nov-2016 22:56

How to export data to text file with fixed record length?

for instance:

120161109XYZbbbbbbbbbbZ000100

120161109ABCbbbbbbbbbbZ000150

120161009ABCbbbbbbbbbbZ000090

Any idea

All Replies

Posted by mpiscoso@gmail.com on 24-Nov-2016 22:37

I think you should be able to use a formula field and add the padding/leading characters using code.

You may then export the formula field.

ex.

var test = "{!field#value}";

while (test.length != 20) {

test += "0"; //add character 0 until the length is 20.

}

return test;

Hope that helps.

This thread is closed