Small updates to fP

This commit is contained in:
2025-10-29 12:43:09 +03:00
parent f0a3c4662b
commit 0789260733

View File

@@ -4,7 +4,7 @@ let
GET_PARAMETER = try GET_PARAMETER = try
let let
GetTable = Excel.CurrentWorkbook(){[Name="PARAMETERS_TABLE"]}[Content], GetTable = Excel.CurrentWorkbook(){[Name="PARAMETERS_TABLE"]}[Content],
KeepNeeded = Table.SelectColumns(GetTable,{"ПАРАМЕТР", "ЗНАЧЕНИЕ","ТИП"}), KeepNeeded = Table.SelectColumns(GetTable,{"ПАРАМЕТР", "ЗНАЧЕНИЕ", "ТИП"}),
SetTypes = Table.TransformColumnTypes(KeepNeeded,{{"ПАРАМЕТР", type text}, {"ЗНАЧЕНИЕ", type any}, {"ТИП", type text}}), SetTypes = Table.TransformColumnTypes(KeepNeeded,{{"ПАРАМЕТР", type text}, {"ЗНАЧЕНИЕ", type any}, {"ТИП", type text}}),
Filter = Table.SelectRows(SetTypes, each ([ПАРАМЕТР] = P_NAME)), Filter = Table.SelectRows(SetTypes, each ([ПАРАМЕТР] = P_NAME)),
Value = Table.SingleRow(Filter) Value = Table.SingleRow(Filter)
@@ -14,7 +14,10 @@ let
PATH_OVERRIDE = try if P_NAME = "PATH_OVERRIDE" then null else @fP("PATH_OVERRIDE") otherwise null, PATH_OVERRIDE = try if P_NAME = "PATH_OVERRIDE" then null else @fP("PATH_OVERRIDE") otherwise null,
P_TYPE = if GET_PARAMETER <> null then P_TYPE = if GET_PARAMETER <> null then
if P_FORCED_TYPE = null then GET_PARAMETER[ТИП] else P_FORCED_TYPE if P_FORCED_TYPE = null then
GET_PARAMETER[ТИП]
else
P_FORCED_TYPE
else else
null, null,
@@ -65,6 +68,8 @@ let
Result, Result,
// СПИСОК В ФОРМАТЕ PQ // СПИСОК В ФОРМАТЕ PQ
// Ввод через точку с запятой, напр.: 1;2;яблоко;-10
// Точка с запятой плюс пробел меняются на точку с запятой
F_List = (Input as any) => let F_List = (Input as any) => let
Result = Text.Split(Text.Replace(Text.From(Input), "; ", ";"), ";") Result = Text.Split(Text.Replace(Text.From(Input), "; ", ";"), ";")
in in