Forum Discussion
Custom Connector: Changing Icons in Navigation Pane
Thank you, Anonymous !!
But I still have this issue. Could you help me with that?
I would like to give you an example.
I want to change the icon of Item3 to a table. I know that the data of Item3 shows a function. Therefore I change the ItemKind and ItemName to Table in the navTable:
objects = #table(
{"Name", "Key", "Data", "ItemKind", "ItemName", "IsLeaf"},{
{"Item1", "item1", #table({"Column1"}, {{"Item1"}}), "Function", "Function", true},
{"Item2", "item2", #table({"Column1"}, {{"Item2"}}), "Database", "Database", true},
{"Item3", "item3", (a) => FunctionCallThatReturnsATable(), "Table", "Table", true},
{"Item4", "item4", #table({"Column1"}, {{"Item2"}}), "Table", "Table", true}
}),
NavTable = Table.ToNavigationTable(objects, {"Key"}, "Name", "Data", "ItemKind", "ItemName", "IsLeaf")
// Common library code
Table.ToNavigationTable = (
table as table,
keyColumns as list,
nameColumn as text,
dataColumn as text,
itemKindColumn as text,
itemNameColumn as text,
isLeafColumn as text
) as table =>
let
tableType = Value.Type(table),
newTableType = Type.AddTableKey(tableType, keyColumns, true) meta [
NavigationTable.NameColumn = nameColumn,
NavigationTable.DataColumn = dataColumn,
NavigationTable.ItemKindColumn = itemKindColumn,
NavigationTable.ItemNameColumn = itemNameColumn,
NavigationTable.IsLeafColumn = isLeafColumn
],
navigationTable = Value.ReplaceType(table, newTableType)
in
navigationTable;
But I still get the function icon in the navigator: