mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
⚡ Make it possible to return all matches in with GoogleSheet Lookup
This commit is contained in:
@@ -267,6 +267,20 @@ export class GoogleSheets implements INodeType {
|
||||
placeholder: 'Add Option',
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Return All Matches',
|
||||
name: 'returnAllMatches',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
displayOptions: {
|
||||
show: {
|
||||
'/operation': [
|
||||
'lookup',
|
||||
],
|
||||
},
|
||||
},
|
||||
description: 'By default only the first result gets returned. If options gets set all found matches get returned.',
|
||||
},
|
||||
{
|
||||
displayName: 'Value Input Mode',
|
||||
name: 'valueInputMode',
|
||||
@@ -436,7 +450,7 @@ export class GoogleSheets implements INodeType {
|
||||
});
|
||||
}
|
||||
|
||||
const returnData = await sheet.lookupValues(sheetData, keyRow, dataStartRow, lookupValues);
|
||||
const returnData = await sheet.lookupValues(sheetData, keyRow, dataStartRow, lookupValues, options.returnAllMatches as boolean | undefined);
|
||||
|
||||
return [this.helpers.returnJsonArray(returnData)];
|
||||
} else if (operation === 'read') {
|
||||
|
||||
Reference in New Issue
Block a user