Browse Source

fix: correction in IF formula

pull/7268/head
Pranav C 11 months ago
parent
commit
019e5b0919
  1. 6
      packages/nocodb/src/db/functionMappings/commonFns.ts

6
packages/nocodb/src/db/functionMappings/commonFns.ts

@ -43,13 +43,13 @@ export default {
switch (args.pt.arguments[0].dataType as FormulaDataTypes) { switch (args.pt.arguments[0].dataType as FormulaDataTypes) {
case FormulaDataTypes.NUMERIC: case FormulaDataTypes.NUMERIC:
cond = `(${condArg}) IS NOT NULL OR (${condArg}) != 0`; cond = `(${condArg}) IS NOT NULL AND (${condArg}) != 0`;
break; break;
case FormulaDataTypes.STRING: case FormulaDataTypes.STRING:
cond = `(${condArg}) IS NOT NULL OR (${condArg}) != ''`; cond = `(${condArg}) IS NOT NULL AND (${condArg}) != ''`;
break; break;
case FormulaDataTypes.BOOLEAN: case FormulaDataTypes.BOOLEAN:
cond = `(${condArg}) IS NOT NULL OR (${condArg}) != false`; cond = `(${condArg}) IS NOT NULL AND (${condArg}) != false`;
break; break;
} }

Loading…
Cancel
Save