Forum Discussion
Navigator window not displaying function input parameters. Custom Connector for Power BI
- Anonymous3 years ago
So I found a solution from the PowerBI REST API connector project. Basically you need a special implementation of the Table.ToNavigationTable function. It seems that you need to delete the "Preview.DelayColumn = itemNameColumn" from Table.ToNavigationTable .
This implementation of the navigation table works:
Table.ForceToNavigationTable = ( 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.IsLeafColumn = isLeafColumn ], navigationTable = Value.ReplaceType(table, newTableType) in navigationTable;The only problem I have now is that the documentation is not shown in the Navigator window:
In the Power Query Editor it looks like this:
Hi,
The examples you have given are with functions that does not implement parameters. I have implemented the NavigationTable function from Handling navigation for Power Query connectors | Microsoft Docs. For instance, if I add a parameter to FunctionCallThatReturnATable then I get the same "No Paramters Specified"-Window in the Navigator. Why does the Preview window not allow me to generate the function UI. In the Power Query editor it works just fine.
shared NavigationTable.Simple = () =>
let
objects = #table(
{"Name", "Key", "Data", "ItemKind", "ItemName", "IsLeaf"},{
{"Item1", "item1", #table({"Column1"}, {{"Item1"}}), "Table", "Table", true},
{"Item2", "item2", #table({"Column1"}, {{"Item2"}}), "Table", "Table", true},
{"Item3", "item3", (t as text) => FunctionCallThatReturnsATable(t), "Table", "Table", true},
{"MyFunction", "myfunction", AnotherFunction.Contents, "Function", "Function", true}
}),
NavTable = Table.ToNavigationTable(objects, {"Key"}, "Name", "Data", "ItemKind", "ItemName", "IsLeaf")
in
NavTable;
shared FunctionCallThatReturnsATable = (t as text) =>
#table({"DynamicColumn"}, {{t}});
- Anonymous3 years agoNot applicable
Thank you, really appreciate the help! I will check it out.