From c7919e6f17a5a96766428d9fc38d6530daa56890 Mon Sep 17 00:00:00 2001 From: Alex Bourret Date: Tue, 16 Sep 2025 09:07:28 +0200 Subject: [PATCH 1/2] reintroducing manual select based on selector choice --- custom-recipes/googlesheets-append/recipe.json | 14 +++++++------- python-lib/googlesheets_common.py | 2 ++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/custom-recipes/googlesheets-append/recipe.json b/custom-recipes/googlesheets-append/recipe.json index 83197a8..f57765e 100644 --- a/custom-recipes/googlesheets-append/recipe.json +++ b/custom-recipes/googlesheets-append/recipe.json @@ -94,19 +94,19 @@ "mandatory": true, "defaultValue": "append" }, - { - "name": "tab_id", - "label": "Sheet name (legacy)", - "description": "Legacy, please prefer using the \"Sheet name\" selector below", - "type": "STRING", - "visibilityCondition": "model.show_advanced_parameters==true || (model.tabs_ids==null && model.tab_id!=null && model.tab_id!='')" - }, { "name": "tabs_ids", "label": "Sheet name", "type": "SELECT", "getChoicesFromPython": true }, + { + "name": "tab_id", + "label": "Sheet name", + "description": "", + "type": "STRING", + "visibilityCondition": "model.show_advanced_parameters==true || (model.tabs_ids==null && model.tab_id!=null && model.tab_id!='') || (model.tabs_ids=='__dku_manual_select')" + }, { "name": "insert_format", "label": "Values interpretation", diff --git a/python-lib/googlesheets_common.py b/python-lib/googlesheets_common.py index 1fdb243..fd512c5 100644 --- a/python-lib/googlesheets_common.py +++ b/python-lib/googlesheets_common.py @@ -57,6 +57,8 @@ def get_tab_ids(config): legacy_tab_id = config.get("tab_id", None) tabs_ids = config.get("tabs_ids") tabs_ids = tabs_ids or [] + if tabs_ids == "__dku_manual_select": + return [legacy_tab_id] if type(tabs_ids) == str: tabs_ids = [tabs_ids] if not tabs_ids: From c4c80a0aa921e587bd94af96f4607046dfd22f47 Mon Sep 17 00:00:00 2001 From: Alex Bourret Date: Tue, 16 Sep 2025 10:49:00 +0200 Subject: [PATCH 2/2] add manual option in do function --- resource/browse_sheets.py | 1 + 1 file changed, 1 insertion(+) diff --git a/resource/browse_sheets.py b/resource/browse_sheets.py index ad7d5bb..6610426 100644 --- a/resource/browse_sheets.py +++ b/resource/browse_sheets.py @@ -38,6 +38,7 @@ def do(payload, config, plugin_config, inputs): except Exception as error_message: return build_select_choices("{}".format(error_message)) choices = [] + choices.append({"label": "✍️ Enter manually", "value": "__dku_manual_select"}) for worksheet in worksheets: worksheet_title = "{}".format(worksheet.title) choices.append({