Scripting Engine Reference
Outline
Scripting Engine is a script parser engine which parses script expressions in a string. A script expression can be placed in any text-field in the Business Analyze Analysis module.
Learning Scripting Engine is part of the Advanced Training course.
Anatomy
The anatomy of a scripting engine expression is as follows:
=[function]([functionInput]);
[function] is the type of Scripting Engine function
[functionInput] is the input variables/properties you want to provide for the function to parse
These functions has either:
- Simple/single input which is a single value
- Complex input which is multiple properties formatted as JSON style Property/Value pairs:
{"PropertyName1": "Value1", "PropertyName2": "Value2"}
Usage
A script expression can be a part of a sentence:
Good morning, =u(fullname);. How are you?
A script expression can be nested:
=l(month=eval(var m =new Date().getMonth()+1; m<10 ? '0'+m : '' + m););
A string can contain numerous script expressions:
Current logged on user is =u(fullname); which uses locale =u(locale);
A script expression can reference row data by column reference:
=eval([soldAmount]*5);
Build, debug and test your expressions
The Analyze PRO platform comes with a Scripting Engine Expression tester page where you can build and test your expressions.
This interface you will find in System Administration -> Analyze Dashboard -> Scripting Engine expression tester
Functions
Function | Description |
---|---|
=locale(); | Retrieves a localized string from the language files for the current user context |
=systemVariables(); | Retrieves the a system variable setting for the current user context |
=image(); | Creates a HTML image tag to be used in your dashboards (with a hyperlink if requested) |
=solink(); | Creates a SuperOffice Owl link to be used in dashboards |
=solocale(); | New in 4.2: Evaluates a SuperOffice multilanguage string and returns the desired localized string |
=user(); | Retrieves values from the current user context |
=date(); | Calculates dates based on numerous inputs |
=appenddate(); | New in 5.8.1: Calculates append date when cachemode is in Append Mode |
=eval(); | Evaluates and executes input JavaScript code |
=parameter(); | Retrieves selected parameters and formats output according to properties given |
=dynamicvalue(); | Executes and retrieves database data through a data table definition |
=env(); | New in 4.2: Retrieves environment settings for the platform |
=remotecolfilter(); | New in 5.7.1. Release october 2018. Retrives and parses column values from drill-down values. |