Child pages
  • Intro to Servoy Concepts

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A calculation is a derived value that acts like another column in the database table. Calculation data is the result of a JavaScript function and is similar to a Servoy method. The main difference is what is available to the function; a calculation function cannot access form variables, values from form elements, or application functions as it is calculated in the data layer of the application. The function does have the current column's data and any related data available to it.A calculation is calculated when the

Calculations come in two variants: Stored Calculations and Unstored Calculations: Stored calculation are actual database columns, while unstored calculation only live in memory when the solution is running.

Calculations are calculated when their value is requested, for example when it is displayed in the UI or used in scripting or in another calculation , and the value was not calculated yet or has been flagged or invalidated.
A as invalid. A calculation is flagged as invalidated when a change occurs in one of its inputs changesthe dataproviders on which the calculation depends.

When the returned value of a calculation is invalidated, an event is fired through changes, all elements in the UI so that when display the calculation is displayed the UI element value will be automatically updated.  When

If the calculation is a stored calculation changes, the record it is part of will be marked as changed (will thus it'll be in the list of edited records) and will be part of next save action.Calculations are stored in the solution data, but are based on a table. Stored calculation values are stored in an actual database column, while unstored calculation values are only derived when used by the application.

Aggregation

An aggregation is a value derived from a set of records in a table, they are computed based on a set of values in a column. Similar to calculations, aggregation metadata is stored with the solution, but are based on a table. Aggregations can count, sum, maximum, minimum, and average.

...