<?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: Manage function (or table) parameters in Navigation Table in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Manage-function-or-table-parameters-in-Navigation-Table/m-p/2747345#M38389</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/320777"&gt;@v-chenwuz-msft&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not at all ^^&amp;nbsp;&lt;BR /&gt;I enjoyed a long week-end and then now I can dive in again!&lt;/P&gt;</description>
    <pubDate>Mon, 05 Sep 2022 09:08:59 GMT</pubDate>
    <dc:creator>5AMsan</dc:creator>
    <dc:date>2022-09-05T09:08:59Z</dc:date>
    <item>
      <title>Manage function (or table) parameters in Navigation Table</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Manage-function-or-table-parameters-in-Navigation-Table/m-p/2738405#M38276</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I'm trying to add parameters to API calls. OAuth is working and I can generate a list of available datasets in a dynamic navigation table:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="5AMsan_0-1661956263330.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/775293i9E07325DEEB700AE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="5AMsan_0-1661956263330.png" alt="5AMsan_0-1661956263330.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the auth screen with no optional parameters, the one I want to appear in the screenshot above (in the right pane):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="5AMsan_1-1661956819244.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/775309i6C6C31F474733E0F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="5AMsan_1-1661956819244.png" alt="5AMsan_1-1661956819244.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I can't figure out how to allow date and dimension parameters and show on right pane (the one showing error, since dates and dimensions are null).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I read the whole TripPin walkthrough several times to end up at this point, but I'm getting lost about parameters and navigation table...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is some relevant code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;[DataSource.Kind="PQ_SearchConsole", Publish="PQ_SearchConsole.Publish"]
shared PQ_SearchConsole.Contents = Value.ReplaceType(CreateNavTable, contentsType);
contentsType = type function (
    optional start as (type text meta [
        Documentation.FieldCaption = "Début",
        Documentation.FieldDescription = "Date de début de l'extraction (les mots clés sont autorisés : `today`, `yesterday`, `60daysAgo`).",
        Documentation.SampleValues = {"2022-01-01"}
    ]),
    optional end as (type text meta [
        Documentation.FieldCaption = "Fin",
        Documentation.FieldDescription = "Date de fin de l'extraction (les mots clés sont autorisés : `today`, `yesterday`, `60daysAgo`).",
        Documentation.SampleValues = {"yesterday"}
    ]),
    optional params  as (type nullable text meta [
        Documentation.FieldCaption = "Dimensions",
        Documentation.FieldDescription = "Saisir les dimensions souhaitées",
        Documentation.SampleValues = {"query,page,device,country"}
    ])

) as table [...]&lt;/LI-CODE&gt;&lt;LI-CODE lang="csharp"&gt;CreateNavTable = (
    optional start as text, 
    optional end as text, 
    optional params as nullable text
) as table =&amp;gt; 
    let
        sites = GetSitesList(),
        navBody = List.Accumulate( sites[siteUrl], {}, (state, current)=&amp;gt; state &amp;amp;
            {{current, current, PQ_SearchConsole.GetContents(current,start,end,params), "Function", "Function", true}}
        ),

        navHeader = {"Name","Key","Data","ItemKind", "ItemName", "IsLeaf"}, 
        objects = #table(navHeader, navBody),
        NavTable = Table.ToNavigationTable(objects, {"Key"}, "Name", "Data", "ItemKind", "ItemName", "IsLeaf")
    in
        NavTable&lt;/LI-CODE&gt;&lt;LI-CODE lang="csharp"&gt;GetSitesList = () as table =&amp;gt; 
    let
        source = Json.Document( Web.Contents ( api_base_uri ) ),
        sites = Table.FromRecords( source[siteEntry], type table[siteUrl = Text.Type /*, permissionLevel = Text.Type*/] )
    in
        sites;&lt;/LI-CODE&gt;&lt;LI-CODE lang="csharp"&gt;PQ_SearchConsole.GetContents = (
    website as text,
    start as text, 
    end as text, 
    params as nullable text
)  =&amp;gt;
    let 
        now =  DateTime.FixedLocalNow(), 

        reqStartDate = Date.From(dateFunc(start)), // #date( Date.Year(now), Date.Month(now) - 1 , Date.Day(now) ),
        reqEndDate = Date.From(dateFunc(end)), //  #date( Date.Year(now), Date.Month(now), Date.Day(now) ),
        reqDimensions = if params="" or params = null then {} else Text.Split(params,","),
        source = Web.Contents( api_base_uri, [
            RelativePath = Text.Combine({Uri.EscapeDataString(website), "/searchAnalytics/query"}), 
            Headers = [#"Content-Type"="application/json"],
            Content = Json.FromValue([startDate = reqStartDate, endDate = reqEndDate, dimension = reqDimensions]) 
        ]),
        report = Json.Document(source)
    in
        report&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;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2022 14:43:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Manage-function-or-table-parameters-in-Navigation-Table/m-p/2738405#M38276</guid>
      <dc:creator>5AMsan</dc:creator>
      <dc:date>2022-08-31T14:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: Manage function (or table) parameters in Navigation Table</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Manage-function-or-table-parameters-in-Navigation-Table/m-p/2742585#M38304</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/435294"&gt;@5AMsan&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you get your problem solved?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2022 07:23:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Manage-function-or-table-parameters-in-Navigation-Table/m-p/2742585#M38304</guid>
      <dc:creator>v-chenwuz-msft</dc:creator>
      <dc:date>2022-09-02T07:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: Manage function (or table) parameters in Navigation Table</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Manage-function-or-table-parameters-in-Navigation-Table/m-p/2747345#M38389</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/320777"&gt;@v-chenwuz-msft&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not at all ^^&amp;nbsp;&lt;BR /&gt;I enjoyed a long week-end and then now I can dive in again!&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 09:08:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Manage-function-or-table-parameters-in-Navigation-Table/m-p/2747345#M38389</guid>
      <dc:creator>5AMsan</dc:creator>
      <dc:date>2022-09-05T09:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: Manage function (or table) parameters in Navigation Table</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Manage-function-or-table-parameters-in-Navigation-Table/m-p/2752458#M38459</link>
      <description>&lt;P&gt;I must admit I'm quite puzzled there's no documentation about having parameters for functions or tables exposed as navigation in Power BI. I'm sure some connectors use this, but no way to find anything about this &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 08:01:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Manage-function-or-table-parameters-in-Navigation-Table/m-p/2752458#M38459</guid>
      <dc:creator>5AMsan</dc:creator>
      <dc:date>2022-09-07T08:01:21Z</dc:date>
    </item>
  </channel>
</rss>

