Small updates to fP
This commit is contained in:
@@ -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,9 +14,12 @@ 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
|
||||||
else
|
GET_PARAMETER[ТИП]
|
||||||
null,
|
else
|
||||||
|
P_FORCED_TYPE
|
||||||
|
else
|
||||||
|
null,
|
||||||
|
|
||||||
P_VALUE = if GET_PARAMETER <> null then
|
P_VALUE = if GET_PARAMETER <> null then
|
||||||
if PATH_OVERRIDE <> null and
|
if PATH_OVERRIDE <> null and
|
||||||
@@ -64,7 +67,9 @@ let
|
|||||||
in
|
in
|
||||||
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
|
||||||
@@ -136,7 +141,7 @@ let
|
|||||||
|
|
||||||
SelectCase = List.First(List.Select(CaseValues, each _{0} = true)){1}
|
SelectCase = List.First(List.Select(CaseValues, each _{0} = true)){1}
|
||||||
|
|
||||||
in
|
in
|
||||||
SelectCase
|
SelectCase
|
||||||
in
|
in
|
||||||
fP
|
fP
|
||||||
Reference in New Issue
Block a user