Skip to content

Commit

Permalink
fix(Google Sheets Node): Update name and hint for useAppend option (n…
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-radency authored Aug 15, 2024
1 parent 4dee7cc commit c5a0c04
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
mapFields,
untilSheetSelected,
} from '../../helpers/GoogleSheets.utils';
import { cellFormat, handlingExtraData } from './commonDescription';
import { cellFormat, handlingExtraData, useAppendOption } from './commonDescription';

export const description: SheetProperties = [
{
Expand Down Expand Up @@ -198,14 +198,7 @@ export const description: SheetProperties = [
...handlingExtraData,
displayOptions: { show: { '/columns.mappingMode': ['autoMapInputData'] } },
},
{
displayName: 'Use Append',
name: 'useAppend',
type: 'boolean',
default: false,
description:
'Whether to use append instead of update(default), this is more efficient but in some cases data might be misaligned',
},
useAppendOption,
],
},
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ import {
checkForSchemaChanges,
untilSheetSelected,
} from '../../helpers/GoogleSheets.utils';
import { cellFormat, handlingExtraData, locationDefine } from './commonDescription';
import {
cellFormat,
handlingExtraData,
locationDefine,
useAppendOption,
} from './commonDescription';

export const description: SheetProperties = [
{
Expand Down Expand Up @@ -212,14 +217,7 @@ export const description: SheetProperties = [
...handlingExtraData,
displayOptions: { show: { '/columns.mappingMode': ['autoMapInputData'] } },
},
{
displayName: 'Use Append',
name: 'useAppend',
type: 'boolean',
default: false,
description:
'Whether to use append instead of update(default), this is more efficient but in some cases data might be misaligned',
},
useAppendOption,
],
},
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,3 +258,13 @@ export const handlingExtraData: INodeProperties = {
default: 'insertInNewColumn',
description: "What do to with fields that don't match any columns in the Google Sheet",
};

export const useAppendOption: INodeProperties = {
displayName: 'Minimise API Calls',
name: 'useAppend',
type: 'boolean',
default: false,
hint: 'Use if your sheet has no gaps between rows or columns',
description:
'Whether to use append instead of update(default), this is more efficient but in some cases data might be misaligned',
};
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const versionDescription: INodeTypeDescription = {
hints: [
{
message:
"Use the 'Use Append' option for greater efficiency if your sheet is uniformly formatted without gaps between columns or rows",
"Use the 'Minimise API Calls' option for greater efficiency if your sheet is uniformly formatted without gaps between columns or rows",
displayCondition:
'={{$parameter["operation"] === "append" && !$parameter["options"]["useAppend"]}}',
whenToDisplay: 'beforeExecution',
Expand Down

0 comments on commit c5a0c04

Please sign in to comment.