Process formulas after processing complex fields

This commit is contained in:
Adria Navarro 2023-10-09 15:28:27 +02:00
parent 065e633742
commit 0909e0547e
1 changed files with 4 additions and 3 deletions

View File

@ -219,9 +219,6 @@ export async function outputProcessing<T extends Row[] | Row>(
? await linkRows.attachFullLinkedDocs(table, safeRows)
: safeRows
// process formulas
enriched = processFormulas(table, enriched, { dynamic: true }) as Row[]
// set the attachments URLs
for (let [property, column] of Object.entries(table.schema)) {
if (column.type === FieldTypes.ATTACHMENT) {
@ -242,6 +239,10 @@ export async function outputProcessing<T extends Row[] | Row>(
}
}
}
// process formulas
enriched = processFormulas(table, enriched, { dynamic: true }) as Row[]
if (opts.squash) {
enriched = (await linkRows.squashLinksToPrimaryDisplay(
table,