<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Navigator window not displaying function input parameters. Custom Connector for Power BI in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Navigator-window-not-displaying-function-input-parameters-Custom/m-p/2958257#M40216</link>
    <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please refer the following links to get it:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/power-query/handlingnavigationtables" target="_blank" rel="noopener nofollow noreferrer"&gt;Handling navigation for Power Query connectors | Microsoft Docs&lt;/A&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;shared NavigationTable.Simple = () =&amp;gt;
    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",      FunctionCallThatReturnsATable(),  "Table",    "Table",    true},            
            {"MyFunction", "myfunction", AnotherFunction.Contents,       "Function", "Function", true}
            }),
        NavTable = Table.ToNavigationTable(objects, {"Key"}, "Name", "Data", "ItemKind", "ItemName", "IsLeaf")
    in
        NavTable;

shared FunctionCallThatReturnsATable = () =&amp;gt;
    #table({"DynamicColumn"}, {{"Dynamic Value"}});&lt;/LI-CODE&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Power-Query/Custom-Connector-and-Navigation-Tables/td-p/891075" target="_self"&gt;&lt;SPAN&gt;Custom Connector and Navigation Tables&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt; GetRows = () =&amp;gt; if (state &amp;lt;&amp;gt; null) then state else
                    let
                        list = listFunction(),
                        withName = Table.FromRecords(list, {"Name", "ItemKind", "Parameters"}, MissingField.UseNull),
                        withData = Table.AddColumn(withName, "Data", each dataFunction([Name], [Parameters])),
                        withItemName = Table.AddColumn(withData, "ItemName", each if [Parameters] = null or Record.FieldCount([Parameters]) = 0 then "Table" else null),
                        withoutParameters = Table.RemoveColumns(withItemName, {"Parameters"}),
                        withIsLeaf = Table.AddColumn(withoutParameters, "IsLeaf", each isLeaf),
                        navTable = Table.ToNavigationTable(withIsLeaf, {"Name"}, "Name", "Data", "ItemKind", "ItemName", "IsLeaf")
                    in
                        navTable&lt;/LI-CODE&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
    <pubDate>Fri, 09 Dec 2022 06:22:35 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-12-09T06:22:35Z</dc:date>
    <item>
      <title>Navigator window not displaying function input parameters. Custom Connector for Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Navigator-window-not-displaying-function-input-parameters-Custom/m-p/2956097#M40197</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a custom connector for Power BI. I have followed the documentation on how to set up&lt;/P&gt;&lt;P&gt;a Navigation Table. The table will navigate to three different functions.&lt;BR /&gt;&lt;BR /&gt;I have set up the code accordingly. However, the UI for the function inputs is not generated in the Navigator window. Rather I am seeing this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="stormnhaab_0-1670480289167.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/837383i6DFAD3DCE5A25355/image-size/medium?v=v2&amp;amp;px=400" role="button" title="stormnhaab_0-1670480289167.png" alt="stormnhaab_0-1670480289167.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I&amp;nbsp;see the UI just fine in the Power Query Editor. Here is my implementation of some test code:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[DataSource.Kind="PQExtension1", Publish="PQExtension1.Publish"]
shared PQExtension1.Contents = () as table =&amp;gt;
    let
        objects = #table(
            {"Name", "Key", "Data",  "ItemKind", "ItemName", "IsLeaf"},{
            {"Item1", "item1", PQExtension1.GetSeries, "Function", "Function", true}
        }),
        NavTable = Table.ToNavigationTable(objects, {"Key"}, "Name", "Data", "ItemKind", "ItemName", "IsLeaf")
    in
        NavTable;

[DataSource.Kind = "PQExtension1"]
shared PQExtension1.GetSeries = () =&amp;gt; Value.ReplaceType(HelloWorldImpl, HelloWorldType)
        

HelloWorldType = type function (
    message as (type text meta [
        Documentation.FieldCaption = "Message",
        Documentation.FieldDescription = "Text to display",
        Documentation.SampleValues = {"Hello world", "Hola mundo"}
    ]),
    optional count as (type number meta [
        Documentation.FieldCaption = "Count",
        Documentation.FieldDescription = "Number of times to repeat the message",
        Documentation.AllowedValues = { 1, 2, 3 }
    ]))
    as table meta [
        Documentation.Name = "Hello - Name",
        Documentation.LongDescription = "Hello - Long Description",
        Documentation.Examples = {[
            Description = "Returns a table with 'Hello world' repeated 2 times",
            Code = "HelloWorldWithDocs.Contents(""Hello world"", 2)",
            Result = "#table({""Column1""}, {{""Hello world""}, {""Hello world""}})"
        ],[
            Description = "Another example, new message, new count!",
            Code = "HelloWorldWithDocs.Contents(""Goodbye"", 1)",
            Result = "#table({""Column1""}, {{""Goodbye""}})"
        ]}
    ];

HelloWorldImpl = (message as text, optional count as number) as table =&amp;gt;
    let
        _count = if (count &amp;lt;&amp;gt; null) then count else 5,
        listOfMessages = List.Repeat({message}, _count),
        table = Table.FromList(listOfMessages, Splitter.SplitByNothing())
    in
        table;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;I appreciate any help on this. I have seen similar posts here in the Power BI forum but clear solutions have not been given.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 08:36:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Navigator-window-not-displaying-function-input-parameters-Custom/m-p/2956097#M40197</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-08T08:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: Navigator window not displaying function input parameters. Custom Connector for Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Navigator-window-not-displaying-function-input-parameters-Custom/m-p/2958257#M40216</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please refer the following links to get it:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/power-query/handlingnavigationtables" target="_blank" rel="noopener nofollow noreferrer"&gt;Handling navigation for Power Query connectors | Microsoft Docs&lt;/A&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;shared NavigationTable.Simple = () =&amp;gt;
    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",      FunctionCallThatReturnsATable(),  "Table",    "Table",    true},            
            {"MyFunction", "myfunction", AnotherFunction.Contents,       "Function", "Function", true}
            }),
        NavTable = Table.ToNavigationTable(objects, {"Key"}, "Name", "Data", "ItemKind", "ItemName", "IsLeaf")
    in
        NavTable;

shared FunctionCallThatReturnsATable = () =&amp;gt;
    #table({"DynamicColumn"}, {{"Dynamic Value"}});&lt;/LI-CODE&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Power-Query/Custom-Connector-and-Navigation-Tables/td-p/891075" target="_self"&gt;&lt;SPAN&gt;Custom Connector and Navigation Tables&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt; GetRows = () =&amp;gt; if (state &amp;lt;&amp;gt; null) then state else
                    let
                        list = listFunction(),
                        withName = Table.FromRecords(list, {"Name", "ItemKind", "Parameters"}, MissingField.UseNull),
                        withData = Table.AddColumn(withName, "Data", each dataFunction([Name], [Parameters])),
                        withItemName = Table.AddColumn(withData, "ItemName", each if [Parameters] = null or Record.FieldCount([Parameters]) = 0 then "Table" else null),
                        withoutParameters = Table.RemoveColumns(withItemName, {"Parameters"}),
                        withIsLeaf = Table.AddColumn(withoutParameters, "IsLeaf", each isLeaf),
                        navTable = Table.ToNavigationTable(withIsLeaf, {"Name"}, "Name", "Data", "ItemKind", "ItemName", "IsLeaf")
                    in
                        navTable&lt;/LI-CODE&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2022 06:22:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Navigator-window-not-displaying-function-input-parameters-Custom/m-p/2958257#M40216</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-09T06:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: Navigator window not displaying function input parameters. Custom Connector for Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Navigator-window-not-displaying-function-input-parameters-Custom/m-p/2958313#M40217</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;The examples you have given are with functions that does not implement parameters. I have implemented the NavigationTable function from&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/power-query/handlingnavigationtables" target="_blank" rel="noopener nofollow noreferrer"&gt;Handling navigation for Power Query connectors | Microsoft Docs&lt;/A&gt;. 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.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;shared NavigationTable.Simple = () =&amp;gt;
    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) =&amp;gt; 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) =&amp;gt;
    #table({"DynamicColumn"}, {{t}});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2022 06:58:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Navigator-window-not-displaying-function-input-parameters-Custom/m-p/2958313#M40217</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-09T06:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: Navigator window not displaying function input parameters. Custom Connector for Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Navigator-window-not-displaying-function-input-parameters-Custom/m-p/2958401#M40219</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please review the following link, hope it can help you.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/migueesc123/PowerBIRESTAPI/blob/master/Power%20BI%20API/Power%20BI%20API/PBIAPI.pq" target="_self"&gt;&lt;SPAN&gt;PowerBIRESTAPI&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2022 07:38:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Navigator-window-not-displaying-function-input-parameters-Custom/m-p/2958401#M40219</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-09T07:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: Navigator window not displaying function input parameters. Custom Connector for Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Navigator-window-not-displaying-function-input-parameters-Custom/m-p/2958435#M40222</link>
      <description>&lt;P&gt;Thank you, really appreciate the help! I will check it out.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2022 08:00:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Navigator-window-not-displaying-function-input-parameters-Custom/m-p/2958435#M40222</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-09T08:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Navigator window not displaying function input parameters. Custom Connector for Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Navigator-window-not-displaying-function-input-parameters-Custom/m-p/2958736#M40226</link>
      <description>&lt;P&gt;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 .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This implementation of the navigation table works:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;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 =&amp;gt;
    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;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only problem I have now is that the documentation is not shown in the Navigator window:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="stormnhaab_0-1670580766868.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/838221i1DB3F348DD9E8D28/image-size/medium?v=v2&amp;amp;px=400" role="button" title="stormnhaab_0-1670580766868.png" alt="stormnhaab_0-1670580766868.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the Power Query Editor it looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="stormnhaab_1-1670580788992.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/838222i0B000010F6F0EA4F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="stormnhaab_1-1670580788992.png" alt="stormnhaab_1-1670580788992.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2022 10:14:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Navigator-window-not-displaying-function-input-parameters-Custom/m-p/2958736#M40226</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-09T10:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: Navigator window not displaying function input parameters. Custom Connector for Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Navigator-window-not-displaying-function-input-parameters-Custom/m-p/2961140#M40241</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;It's glad to hear that your problem has been resolved. And thanks for sharing your solution here. Thank you.&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 01:31:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Navigator-window-not-displaying-function-input-parameters-Custom/m-p/2961140#M40241</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-12T01:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: Navigator window not displaying function input parameters. Custom Connector for Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Navigator-window-not-displaying-function-input-parameters-Custom/m-p/3054739#M40998</link>
      <description>&lt;P&gt;Hi, I have a similar problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My function has a record type parameter like this&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="function.PNG" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/864607iE4378041F72E08CE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="function.PNG" alt="function.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but in the navigation table it looks like this&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="navigation_table.PNG" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/864610i198EA585985D6041/image-size/medium?v=v2&amp;amp;px=400" role="button" title="navigation_table.PNG" alt="navigation_table.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 09:18:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Navigator-window-not-displaying-function-input-parameters-Custom/m-p/3054739#M40998</guid>
      <dc:creator>trello</dc:creator>
      <dc:date>2023-02-01T09:18:38Z</dc:date>
    </item>
  </channel>
</rss>

