Formatting Views/Reports with Formula fields

Posted by Rollbase User on 09-Jul-2012 09:16

In reports and views, I have having difficulty with formula fields with output type Decimal. They do not display cleanly and are not sortable? It displays many blanks to the left of the value, making the column spacing odd. 1) How can I better format the data in reports/views, and 2) how do I make columns with formula values sortable?

All Replies

Posted by Admin on 09-Jul-2012 11:50

1. Numerical columns (including formulas) are right-aligned. Use "number of decimal places" setting for better formatting.

2. Formula fields are not sortable, this is limitation which cannot change. Consider using triggers to populate "real" data column instead of using Formula.

Posted by Admin on 09-Jul-2012 16:41

1. Is there a way to format the value generated by a formula, like using a regular expression or other syntax. I cannot find any references in the documentation.

2. Can you please elaborate on the use of Triggers to populate "real" data column? There is no "real" data option when creating a Trigger. Can you point me to sample code and/or a more elaborate description in your documentation?


Posted by Admin on 09-Jul-2012 17:15

1. This is standard JavaScript function, so it's not in Rollbase documentation:

var num = 5.56789;

var n=num.toFixed(2);

2. Crate Decimal column and store formula's value in that column. You need to do that when record is created or updated.

Posted by Admin on 11-Jul-2012 00:34

Hi John,

Elaborating on Pavel's response:

1. You have the full power of JavaScript to format values and because of the breadth of JavaScript, a full JavaScript reference is beyond the scope of our documentation, but if you have a web developer on staff this should be something they are comfortable with or at minimum looking up.

2. What Pavel is referring to here is doing something like creating a Trigger of type "Update Field Value" (for example) which updates the value of a field to the result of a formula.

Hope this helps. Let us know if you need more help with this.


This thread is closed