Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Table.ToNavigatorTable function in Custom Connector not treated as a function in VS

Hi, im new to Power BI/power query and currently looking into some things I could create with an API. Wanted to test navigation tables according to https://docs.microsoft.com/en-us/power-query/handlingnavigationtables  The M function Table.ToNavigationTable() is within my connector:

 

 

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",      FunctionCallThatReturnsATable(),  "Table",    "Table",    true},            
            {"MyFunction", "myfunction", AnotherFunction.Contents(),       "Function", "Function", true}
            }),
        NavTable = Table.ToNavigationTable(objects, {"Key"}, "Name", "Data", "ItemKind", "ItemName", "IsLeaf")
    in
        NavTable;

 

 

However Table.ToNavigationTable gives the error "The name Table.ToNavigationTable doesn't exist in the current context" as it was an undeclared variable. I was expecting this function to work as for an example: Table.ToList?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Incase someone stumbles on the same problem working through the docs:

Solution at the bottom in the .pq file

https://github.com/microsoft/DataConnectors/blob/master/samples/NavigationTable/NavigationTable.pq 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Incase someone stumbles on the same problem working through the docs:

Solution at the bottom in the .pq file

https://github.com/microsoft/DataConnectors/blob/master/samples/NavigationTable/NavigationTable.pq 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.