Small updates to fP
This commit is contained in:
@@ -4,7 +4,7 @@ let
|
||||
GET_PARAMETER = try
|
||||
let
|
||||
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}}),
|
||||
Filter = Table.SelectRows(SetTypes, each ([ПАРАМЕТР] = P_NAME)),
|
||||
Value = Table.SingleRow(Filter)
|
||||
@@ -14,9 +14,12 @@ let
|
||||
PATH_OVERRIDE = try if P_NAME = "PATH_OVERRIDE" then null else @fP("PATH_OVERRIDE") otherwise null,
|
||||
|
||||
P_TYPE = if GET_PARAMETER <> null then
|
||||
if P_FORCED_TYPE = null then GET_PARAMETER[ТИП] else P_FORCED_TYPE
|
||||
else
|
||||
null,
|
||||
if P_FORCED_TYPE = null then
|
||||
GET_PARAMETER[ТИП]
|
||||
else
|
||||
P_FORCED_TYPE
|
||||
else
|
||||
null,
|
||||
|
||||
P_VALUE = if GET_PARAMETER <> null then
|
||||
if PATH_OVERRIDE <> null and
|
||||
@@ -65,6 +68,8 @@ let
|
||||
Result,
|
||||
|
||||
// СПИСОК В ФОРМАТЕ PQ
|
||||
// Ввод через точку с запятой, напр.: 1;2;яблоко;-10
|
||||
// Точка с запятой плюс пробел меняются на точку с запятой
|
||||
F_List = (Input as any) => let
|
||||
Result = Text.Split(Text.Replace(Text.From(Input), "; ", ";"), ";")
|
||||
in
|
||||
@@ -136,7 +141,7 @@ let
|
||||
|
||||
SelectCase = List.First(List.Select(CaseValues, each _{0} = true)){1}
|
||||
|
||||
in
|
||||
SelectCase
|
||||
in
|
||||
SelectCase
|
||||
in
|
||||
fP
|
||||
Reference in New Issue
Block a user