16 lines
856 B
Objective-C
16 lines
856 B
Objective-C
let
|
|
ExpandAndRename = (tTarget as table,
|
|
sDataColumnName as text,
|
|
sTagString as text) as table =>
|
|
|
|
let
|
|
tagString = sTagString,
|
|
tableSubstition = try Table.SelectRows(fP("RENAMING_RULES"), each ([#"#"] = tagString)) otherwise error "No substitutions provided",
|
|
extractedColumnNames = try Table.Column(tableSubstition, Table.ColumnNames(tableSubstition){0}) otherwise error "Bad column list",
|
|
newColumnNames = try Table.Column(tableSubstition, Table.ColumnNames(tableSubstition){1}) otherwise error "Bad column list",
|
|
|
|
ExpandData = Table.ExpandTableColumn(tTarget, sDataColumnName, extractedColumnNames, newColumnNames)
|
|
in
|
|
ExpandData
|
|
in
|
|
ExpandAndRename |