mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Adding traceback to trigger formulas
Summary: Traceback is available on the Creator Panel in the formula editor. It is evaluated the same way as for normal formulas. In case when the traceback is not available, only the error name is displayed with information that traceback is not available. Cell with an error, when edited, shows the previous valid value that was used before the error happened (or None for new rows). Value is stored inside the RaisedException object that is stored in a cell. Test Plan: Created tests Reviewers: alexmojaki Reviewed By: alexmojaki Subscribers: alexmojaki, dsagal Differential Revision: https://phab.getgrist.com/D3033
This commit is contained in:
@@ -18,6 +18,9 @@ export interface ColumnRec extends IRowModel<"_grist_Tables_column"> {
|
||||
// Is a real formula column (not an empty column; i.e. contains a non-empty formula).
|
||||
isRealFormula: ko.Computed<boolean>;
|
||||
|
||||
// Is a trigger formula column (not formula, but contains non-empty formula)
|
||||
hasTriggerFormula: ko.Computed<boolean>;
|
||||
|
||||
// Used for transforming a column.
|
||||
// Reference to the original column for a transform column, or to itself for a non-transforming column.
|
||||
origColRef: ko.Observable<number>;
|
||||
@@ -56,6 +59,8 @@ export function createColumnRec(this: ColumnRec, docModel: DocModel): void {
|
||||
|
||||
// Is this a real formula column (not an empty column; i.e. contains a non-empty formula).
|
||||
this.isRealFormula = ko.pureComputed(() => this.isFormula() && this.formula() !== '');
|
||||
// If this column has a trigger formula defined
|
||||
this.hasTriggerFormula = ko.pureComputed(() => !this.isFormula() && this.formula() !== '');
|
||||
|
||||
// Used for transforming a column.
|
||||
// Reference to the original column for a transform column, or to itself for a non-transforming column.
|
||||
|
||||
Reference in New Issue
Block a user