The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi
I am building a custom power bi connector and would like to show the connection window then show the navigator window. But for the life of me I can't figure out how to trigger the navigator window after the connection window is shown.
So 1. this window is showing currently and works fine.
Then when the Ok button is clicked I'd like to show the navigator window. I have the code for the navigator but I have no idea how to show it.
The code i have for the navigator is
PrimeecoConnectorNavTable = (apiUrl as text, tokenUrl as text, username as text, password as text, clientId as text, clientSecret as text) as table =>
let
entitiesAsTable = Table.FromList(RootEntities, Splitter.SplitByNothing()),
rename = Table.RenameColumns(entitiesAsTable, {{"Column1", "Name"}}),
// Use Feed function with required parameters
withData = Table.AddColumn(rename, "Data", each PrimeecoConnectorImpl(username, password, clientId, clientSecret,Uri.Combine(apiUrl, [Name]), tokenUrl), Uri.Type),
withItemKind = Table.AddColumn(withData, "ItemKind", each "Table", type text),
withItemName = Table.AddColumn(withItemKind, "ItemName", each "Table", type text),
withIsLeaf = Table.AddColumn(withItemName, "IsLeaf", each true, type logical),
navTable = Table.ToNavigationTable(withIsLeaf, {"Name"}, "Name", "Data", "ItemKind", "ItemName", "IsLeaf")
in
navTable;
Solved! Go to Solution.
Hi, @neilrogers
1.Regarding how you can invoke the PrimeecoConnectorNavTable() function you are using, please refer to the code provided below:
First, you need to have a function that verifies that you are logged in properly.
validateConnection = (username as text, password as text, clientId as text, clientSecret as text) as logical =>
let
// Your validation logic here
isValid = true // Replace with actual validation
in
isValid,
What you might want to note is that I'm ignoring your validation logic.
Second, design a main function for function calling:
mainFunction = (apiUrl as text, tokenUrl as text, username as text, password as text, clientId as text, clientSecret as text) =>
let
isValid = validateConnection(username, password, clientId, clientSecret),
result = if isValid then
PrimeecoConnectorNavTable(apiUrl, tokenUrl, username, password, clientId, clientSecret)
else
error "Invalid connection parameters"
in
result
2.Secondly, here are some navigation validation responses similar to yours:
For further details, please refer to:
Solved: Custom Connector and Navigation Tables - Microsoft Fabric Community
3.Finally, here are some relevant links I found for you:
Power BI Custom Connector: Connect to Any Data Sources. Hello World! - RADACAD
How to create a Power BI custom connector - Vidicorp
Handling navigation for Power Query connectors - Power Query | Microsoft Learn
Power BI Custom Connector - Examples, How to Create?
Of course, if you have any new discoveries or questions, please feel free to get in touch with us.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @neilrogers
1.Regarding how you can invoke the PrimeecoConnectorNavTable() function you are using, please refer to the code provided below:
First, you need to have a function that verifies that you are logged in properly.
validateConnection = (username as text, password as text, clientId as text, clientSecret as text) as logical =>
let
// Your validation logic here
isValid = true // Replace with actual validation
in
isValid,
What you might want to note is that I'm ignoring your validation logic.
Second, design a main function for function calling:
mainFunction = (apiUrl as text, tokenUrl as text, username as text, password as text, clientId as text, clientSecret as text) =>
let
isValid = validateConnection(username, password, clientId, clientSecret),
result = if isValid then
PrimeecoConnectorNavTable(apiUrl, tokenUrl, username, password, clientId, clientSecret)
else
error "Invalid connection parameters"
in
result
2.Secondly, here are some navigation validation responses similar to yours:
For further details, please refer to:
Solved: Custom Connector and Navigation Tables - Microsoft Fabric Community
3.Finally, here are some relevant links I found for you:
Power BI Custom Connector: Connect to Any Data Sources. Hello World! - RADACAD
How to create a Power BI custom connector - Vidicorp
Handling navigation for Power Query connectors - Power Query | Microsoft Learn
Power BI Custom Connector - Examples, How to Create?
Of course, if you have any new discoveries or questions, please feel free to get in touch with us.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.