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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Chaining multi tier UIs

Hello,

 

I'm developing a Power BI connector which queries some api endpoints. The api endpoints are defined in multiple json files. The first input parameter shall take a url to a json file. In the next step a second input parameter is populated based on the first selection as a dropdown. To do so, I'd like to create two UI popups before calculating and showing the results in Power BI.

 

With this documentation https://docs.microsoft.com/en-us/power-query/handlingdocumentation it's a piece of cake to create a UI. However I fail miserably trying to chain both UIs together. I'm able to pass the values from the first UI to the second, however I only see the first UI. The second function isn't invoked and is only shown as a function info. It's still working but as the documentation suggests it's a better user experience showing a UI popup. I also prefer using a multiline multiselect UI in order to query multiple endpoints at once.

 

Is there any way to achieve my idea? It looks like it's support in Power Query given the fact, that querying a SQL Server also chains UI input fields together (first step: select database, second step: select table in database).

 

Here is my code:

 

 

 

 

[DataSource.Kind="Connector", Publish="Connector.Publish"]
shared Connector.Contents = Value.ReplaceType(FirstImpl, FirstType);

FirstType = type function(
    url as (type text meta [
        Documentation.Name = "text",
        Documentation.FieldCaption = "Enter json schema url",
        Documentation.FieldDescription = "Please enter a url to a json schema file.",
        Documentation.SampleValues = {"https://path.to.json.url.com/swagger/v1/swagger.json"}
        ]))
    as text;

FirstImpl = (url as text) => 
    let
        urls = // Create urls...
        result = Value.ReplaceType(SecondImpl, SecondType(urls))
    in
        result;

SecondType = (uris as list) => type function(
    url as (type text meta [
        Documentation.Name = "text",
        Documentation.FieldCaption = "Choose url",
        Documentation.FieldDescription = "Please choose a url from the list below to query.",
        Documentation.SampleValues = {"https://path.to.api.com/api/"},
        Documentation.AllowedValues = uris,
        Formatting.IsMultiLine = true
        ])) as table;

SecondImpl = (url as text) =>
    let
        result = // Query and parse API passed as url
    in
        result as table;

 

 

 

 

 

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

Do you want to generate some UIs similar to cascading drop-down lists? And when selecting the first UI, the second UI should display the corresponding value base on the selected value of first UI? Please review the content in the following blog, hope it can help you.

Specifying Allowed Values, Sample Values and Descriptions For Function Parameters In Power Query

Best Regards

Anonymous
Not applicable


@Anonymous wrote:

Do you want to generate some UIs similar to cascading drop-down lists? And when selecting the first UI, the second UI should display the corresponding value base on the selected value of first UI?


Precisely, please have a look at the build in query for SQL Server. The first UI lets one enter a database and the second UI lists all tables of the database of the first step.

 

I'm trying to achieve a similar behaviour. The first UI lets one enter an arbitrary url to a json file and the second UI displays all api endpoints from this json file.

 

I'm still struggling to invoke a UI within or after another UI.

 


@Anonymous wrote:

Please review the content in the following blog, hope it can help you.

Specifying Allowed Values, Sample Values and Descriptions For Function Parameters In Power Query


It's an interesting blog post, however I failed to achieve an UI invocation from this code - there is no inoke button.

 

Kind regards

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.