I am working on a table and am new to formatting and alignment etc. What I would like to do is format my date (MM/dd/yyyy), amounts (add $) and keep the first 2 column left aligned but right align the last 3 columns. Any help would be appreciated!
var table = new FPTable();
table.AddColumns(8000,29500,7000,7000,5700);
var data = FusionPro.GetMultiLineRecords();
for (var rec = 1; rec <= data.recordCount; rec++) {
function ExField(str) { return '<p br=false linespacing=0.8>' + TaggedTextFromRaw(data.GetFieldValue(rec, str)); }
var content = ["Trx_Date_From","Description","ApprovedAmt", "Payments","Balance"].map(ExField);
var row = table.AddRow();
var [cell] = row.Cells;
cell.Margins = { 'Top': 1, 'Bottom': 1, 'Left': 0, 'Right': 0 };
cell.VAlign = 'Bottom';
row.CopyCells(0, 1, 2, 3, 4);
row.minHeight = 15 * 100; // 15 pt row height.
row.SetContents.apply(row, content);
}
return table.MakeTags();