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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.