Scripting Engine

How to manipulate text and values in a column using scripting

Terje's picture

Sometimes it you'll want to change how the text or values are displayed in a table column. You can do some modifications straight in our dialogs, but by creating a small script you can do even more.
When editing a column in the editor, navigate to the expression tab. Here you can write your own custom code to do all sorts of great stuff.

Here is the basic script you need:

Remove start of a field

Hi

in one of my reports in BA I use the field "Stage" from SuperOffice - Stage here has a fixed percentage/probability for each stage which is also shown in the text:

I need to get rid of the probability and have tried different expressions to cut off the first 5 characters of the Stage field but till now I have not found a solution (Do I have to use the eval procedure together with a javascript expression and use § in front of the ";"?).

Anybody who can hint what to enter to cut off the first characers of a string like Stage?

Best regards

Lars 

=eval(); function

The =eval(); Scripting Engine function evaluates an expression (the input) with a JScript parser. The string input to this function will be evaluated serverside with a JavaScript eval() equivalent function. Eval is a function which parses and executes the content of a string as code.
JScript is a MS version of ECMA Script (JavaScript)

Pages