Action Script

Top  Previous  Next

 

The Action Script window is where you can specify script that defines functions that can get called from the Script Actions menu automatically as long as the functions are defined as ‘export function __’ etc. For example, here I have a script specified that can make all numeric columns with nulls into a 0. I called this function to make all numeric columns in my Logistics - FTE table zero:

 

QUBEXL~1_img95

QUBEXL~1_img96

 

These functions would be equivalent to Excel macros. They are used to pull in data from external sources as well.

 

You could even create a function that imports straight from a system like SAP( Systems Applications and Products, is a widely-used enterprise resource planning (ERP) software ).

 

Here is an example of a function specified for pulling in the General Ledger Master Data(which comes from an Excel workbook):

 

QUBEXL~1_img97

 

This function is then called, along with others that were specified, in another ‘export function’ for importing GL and Costs data into the model:

 

QUBEXL~1_img98

 

This export function is then available in the Script actions dropdown menu and can be run from there:

 

QUBEXL~1_img99

 

You can see in this screenshot, in the Script Actions dropdown list, several other functions that were set up that can be run to do your imports of data and to import and export templates.

 

The way we set up the imports for this model is that you first import your GL and Costs then you mark which items are part of the cost to serve, then you run another function called ImportData to then bring in the data.

 

This is all done with JavaScript and built in to QubeXL and if you needed any change or help with these you would tell us and we will send you the code to paste in or the person your side who set it up can change it. You typically wouldn’t edit or change this code unless familiar with JavaScript or trained to do so.