Forum Discussion
Custom Connector: Changing Icons in Navigation Pane
Hello,
I want to build a nav table so I followed the documentation:
https://learn.microsoft.com/en-us/power-query/handling-navigation-tables#examples
I tried to change the ItemKind of a row in the Simple Navigation Table, that is shown in the documentation.
The documentation says this about ItemKind: "
Each of the following item kind values provide a different icon in the navigation table.
- Feed
- Database
- DatabaseServer
- ..."
So I thought that changing the value for ItemKind in one row of the navigation table also changes to icon in the navigator. But nothing changes:
How can I change the Icon of one element in the navigator window?
3 Replies
- AnonymousNot applicable
Hi Beginna ,
Try changing these two columns to the same value.Handling navigation for Power Query connectors - Power Query | Microsoft Learn
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
- BeginnaNew Member
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:
- tanitoFrequent Visitor
Hello Anonymous,
are you able to look into this matter?
I can provide more examples where the icons don't reflect the item type.