diff --git a/packages/nocodb/src/modules/jobs/jobs/export-import/export.service.ts b/packages/nocodb/src/modules/jobs/jobs/export-import/export.service.ts index 93874dfd45..c34ae99cf0 100644 --- a/packages/nocodb/src/modules/jobs/jobs/export-import/export.service.ts +++ b/packages/nocodb/src/modules/jobs/jobs/export-import/export.service.ts @@ -408,9 +408,13 @@ export class ExportService { .map((c) => c.title) .join(','); - const mmColumns = model.columns.filter( - (col) => isLinksOrLTAR(col) && col.colOptions?.type === 'mm', - ); + const mmColumns = param._fieldIds + ? model.columns + .filter((c) => param._fieldIds?.includes(c.id)) + .filter((col) => isLinksOrLTAR(col) && col.colOptions?.type === 'mm') + : model.columns.filter( + (col) => isLinksOrLTAR(col) && col.colOptions?.type === 'mm', + ); const hasLink = mmColumns.length > 0;