Browse Source

Merge pull request #2390 from nocodb/enhancement/formula

enhancement: allow CONCAT on anything
pull/2436/head
աɨռɢӄաօռɢ 3 years ago committed by GitHub
parent
commit
7e9a13b4fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      packages/nc-gui/components/project/spreadsheet/components/editColumn/FormulaOptions.vue

5
packages/nc-gui/components/project/spreadsheet/components/editColumn/FormulaOptions.vue

@ -267,10 +267,7 @@ export default {
// validate data type // validate data type
if (parsedTree.callee.type === jsep.IDENTIFIER) { if (parsedTree.callee.type === jsep.IDENTIFIER) {
const expectedType = formulas[parsedTree.callee.name].type const expectedType = formulas[parsedTree.callee.name].type
if ( if (expectedType === formulaTypes.NUMERIC) {
expectedType === formulaTypes.NUMERIC ||
expectedType === formulaTypes.STRING
) {
parsedTree.arguments.map(arg => this.validateAgainstType(arg, expectedType, null, typeErrors)) parsedTree.arguments.map(arg => this.validateAgainstType(arg, expectedType, null, typeErrors))
} else if (expectedType === formulaTypes.DATE) { } else if (expectedType === formulaTypes.DATE) {
if (parsedTree.callee.name === 'DATEADD') { if (parsedTree.callee.name === 'DATEADD') {

Loading…
Cancel
Save