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
rtaylor
Helper III
Helper III

Passing User Function Selection to Secondary Navigation Table

Hello,

I've created a data connector and I'm attempting to work on the navigation table piece and have run into an issue

 

https://imgur.com/EB6cvgD


At this point in the process the user must choose from lists generated from the API and use those choices in another API calls to generate other tables.

 

https://imgur.com/lZc9ccp

https://imgur.com/lZc9ccp

 

 


When the user clicks apply the function will invoke another navigation table, however all I get is the table as shown below

 

https://imgur.com/95vliA2


I would like this table to be Navigation Table in some way. May be it could be nested Navigation Table? Or is there another way I should re code this to get the type user interaction I need.

Small snippets of code. I can post the whole thing but its massive
//The Nagivation table is generated
navtablefirstcall = #table(type table [ Name = Text.Type, Key = Text.Type, Data = Any.Type, ItemKind = Text.Type, ItemName= Text.Type, IsLeaf = logical], {
{"Version, Account, and Dimension Call","Key", #"First Navtable Call", "Folder","Folder", false }

                                }),
    gametest = #"Version, Account, and Dimension Call",
    GenerateNavTableNested = Table.ToNavigationTable(navtablefirstcall,{"Key"}, "Name", "Data", "ItemKind", "ItemName", "IsLeaf"),

//Function Type
#"First Navtable Call" =
let
FirstnavtableV2 =
let
MyFunctionTypeFirstNavtablecall = type function(
#"API URL" as #"API URL param",
optional #"Version Choice1" as #"Version Choice1 param"
,optional #"Version Choice2" as #"Version Choice2 param"
,optional #"Version Choice3" as #"Version Choice3 param"
,optional #"Version Choice4" as #"Version Choice4 param"
,optional #"startdate" as #"Time Export Complete Param Start"
,optional #"enddate" as #"Time Export Complete Param End"
,optional #"Account Choice1" as #"Account Choice1 param"
,optional #"Account Choice2" as #"Account Choice2 param"
,optional #"Account Choice3" as #"Account Choice3 param"
,optional #"Account Choice4" as #"Account Choice4 param"
,optional #"Dimension Choice1" as #"Dimension Choice1 param"
,optional #"Dimension Choice2" as #"Dimension Choice2 param"
,optional #"Dimension Choice3" as #"Dimension Choice3 param"
,optional #"Dimension Choice4" as #"Dimension Choice4 param"
,optional #"Dimension Choice5" as #"Dimension Choice5 param"
,optional #"Dimension Choice6" as #"Dimension Choice6 param"
,optional #"Dimension Choice7" as #"Dimension Choice7 param"
,optional #"Dimension Choice8" as #"Dimension Choice8 param"
,optional #"Dimension Choice9" as #"Dimension Choice9 param"
,optional #"Dimension Choice10" as #"Dimension Choice10 param"
,optional #"Dimension Choice11" as #"Dimension Choice11 param"
,optional #"Dimension Choice12" as #"Dimension Choice12 param"
) as table,
Casttotype = Value.ReplaceType(#"Version, Account, and Dimension Call", MyFunctionTypeFirstNavtablecall)
in
Casttotype

//2nd Navtable
navtable = #table(type table [ Name = Text.Type, Key = Text.Type, Data = Table.Type, ItemKind = Text.Type], {
{"Report Category", "Acct_Dim1",#"Report Category"(#"API URL1"), "Table" },
{"Report Standard","Acct_Dim2", #"Report Standard"(#"API URL1"), "Table" },
{"Account Summary","Acct_Dim3", #"Account Summary"(#"API URL1"), "Table" },
{"Date", "Date_Dim1", #"Date"(), "Table" },

        {#"Version Choice1selection", "Data_1",  #"General Report Call"( #"API URL1",#"Version Choice1selection", startdate2, enddate2
        ,#"Account Choice1selection",#"Account Choice2selection",
        #"Account Choice3selection",#"Account Choice4selection"
        ,#"Dimension Choice1selection",#"Dimension Choice2selection"
        ,#"Dimension Choice3selection",#"Dimension Choice4selection"
        ,#"Dimension Choice5selection",#"Dimension Choice6selection"
        ,#"Dimension Choice7selection",#"Dimension Choice8selection"
        ,#"Dimension Choice9selection",#"Dimension Choice10selection"
        ,#"Dimension Choice11selection",#"Dimension Choice12selection"
        ), "Table"},

 

1 REPLY 1
v-shex-msft
Community Support
Community Support

Hi @rtaylor,

It is impossible to add a static variable into the custom connector that you can use to store the previous selections. (connector variables only exist when you initialization and execute on it, it not as same as a global variable that keeps activated and can be involved in other instances)
In my opinion, I'd like to suggest you use query parameters to save these selections and use them in the second connector or directly add these selections as string values and package with the raw result tables then you can manually extract from results records.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.