From d993575308ff80ad9ade150bcbf9b354a3c310fc Mon Sep 17 00:00:00 2001 From: nullptr Date: Sat, 7 Sep 2024 17:40:30 +0200 Subject: [PATCH] feat(getformfields): added `generic` formname when a widget is global to all formnames --- utils/fct/gw_fct_getformfields.sql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/utils/fct/gw_fct_getformfields.sql b/utils/fct/gw_fct_getformfields.sql index ead3919ba6..0bbe7cec35 100644 --- a/utils/fct/gw_fct_getformfields.sql +++ b/utils/fct/gw_fct_getformfields.sql @@ -220,7 +220,6 @@ BEGIN EXECUTE v_querystring INTO fields_array; ELSE - --catalogs and managers v_querystring = concat('SELECT array_agg(row_to_json(a)) FROM ( WITH typevalue AS (SELECT * FROM config_typevalue) @@ -233,7 +232,7 @@ BEGIN LEFT JOIN config_typevalue a ON a.id = widgetfunction::json->>''functionName'' AND a.typevalue = ''widgetfunction_typevalue'' LEFT JOIN config_typevalue b ON b.id = widgettype AND b.typevalue = ''widgettype_typevalue'' - WHERE formname = ',quote_nullable(p_formname),' AND formtype= ',quote_nullable(p_formtype),' ',v_clause,' ',v_filter_widgets,' ORDER BY orderby) a'); + WHERE formname IN (',quote_nullable(p_formname),', ''generic'') AND formtype= ',quote_nullable(p_formtype),' ',v_clause,' ',v_filter_widgets,' ORDER BY orderby) a'); v_debug_vars := json_build_object('v_label', v_label, 'p_tabname', p_tabname, 'v_device', v_device, 'p_formname', p_formname, 'p_formtype', p_formtype, 'v_clause', v_clause); v_debug_sql := json_build_object('querystring', v_querystring, 'vars', v_debug_vars, 'funcname', 'gw_fct_getformfields', 'flag', 10);