diff --git a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte index 24508c8ee6..19543be4c5 100644 --- a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte @@ -435,18 +435,20 @@ error={errors.relatedName} /> {:else if field.type === FORMULA_TYPE} - option.label} + getOptionValue={option => option.value} + tooltip="Dynamic formula are calculated when retrieved, but cannot be filtered, + while static formula are calculated when the row is saved." + /> + {/if} { +exports.processFormulas = (table, rows, { dynamic } = { dynamic: true }) => { const single = !Array.isArray(rows) if (single) { rows = [rows] } for (let [column, schema] of Object.entries(table.schema)) { - if (schema.type !== FieldTypes.FORMULA) { + const isStatic = schema.formulaType === FormulaTypes.STATIC + if ( + schema.type !== FieldTypes.FORMULA || + (dynamic && isStatic) || + (!dynamic && !isStatic) + ) { continue } // iterate through rows and process formula