Browse Source

Merge pull request #7094 from nocodb/nc-fix/formula-ref

fix: use title instead of id while substituting
pull/7097/head
mertmit 1 year ago committed by GitHub
parent
commit
b77cca3750
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/nocodb-sdk/src/lib/formulaHelpers.ts

2
packages/nocodb-sdk/src/lib/formulaHelpers.ts

@ -93,7 +93,7 @@ export function substituteColumnIdWithAliasInFormula(
c.column_name === colNameOrId || c.column_name === colNameOrId ||
c.title === colNameOrId c.title === colNameOrId
); );
pt.name = column?.id || ptRaw?.name || pt?.name; pt.name = column?.title || ptRaw?.name || pt?.name;
} else if (pt.type === 'BinaryExpression') { } else if (pt.type === 'BinaryExpression') {
substituteId(pt.left, ptRaw?.left); substituteId(pt.left, ptRaw?.left);
substituteId(pt.right, ptRaw?.right); substituteId(pt.right, ptRaw?.right);

Loading…
Cancel
Save