Skip to content

Dataspreading

Dataspreading allows the manipulation of large amounts of data in a cube through quick-to-use commands.

How to Dataspread

Dataspreading occurs when inputting a dataspread command into a cube cell. Dataspeading commands are usually input into a cube via a workview interface.

Dataspreading commands can also be input into a cell via processes (cube.set), the MODLR Excel Add-in (CubeSend, CubeSendFirst) and cards (input and trigger components).

From a Process

Pass the command as the objectData string to cube.set, in place of a plain number:

js
cube.set("/add 10", "General Ledger", "Actual", "2014", "600010", "100 - Finance", "No Project", "Amount");

Return value is the cell's previous value, not the result

For a dataspread command, cube.set returns the cell's value before the command ran, not the result of applying it - e.g. cube.set("/add 10", ...) on a cell holding 100 returns "100.0", even though the cell now holds 110. Read the cell back with cube.get to see the actual result. This is different from a plain numeric cube.set(110, ...), which returns the new value.

Dataspreading Commands

  • /clear
  • /copy
  • /set
  • /add
  • /subtract
  • /multiply
  • /divide