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
ChadC
Frequent Visitor

Custom UI when adding new custom connector

Hi, 

 

I have a custom data connector that currently requires the user to enter a string to specify the scope of data they wish to pull when adding the query. There are 37 possible values and I'd like to present the user with a dropdown menu instead of a text input box. I haven't been able to find any documentation on this. Is it possible?

 

For example, the current prompt for users adding this connector:Capture.PNG

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @ChadC 

There are some threads discussing about this problem, you may have a look:

https://community.powerbi.com/t5/Developer/Custom-data-connector-SDK-help-required/m-p/547696#M17057

https://community.powerbi.com/t5/Desktop/Custom-Data-Connector-UI-Dropdown-list/td-p/484102

 

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @ChadC 

There are some threads discussing about this problem, you may have a look:

https://community.powerbi.com/t5/Developer/Custom-data-connector-SDK-help-required/m-p/547696#M17057

https://community.powerbi.com/t5/Desktop/Custom-Data-Connector-UI-Dropdown-list/td-p/484102

 

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for the help @v-juanli-msft . I was able to implement a dropdown menu using the link below which was mentioned in the first post you provided.

https://blog.crossjoin.co.uk/2014/11/27/specifying-allowed-values-sample-values-and-descriptions-for...

 

My code snippet for future reference:

 

[DataSource.Kind="Outreach", Publish="Outreach.Publish"]
shared Outreach.Contents = Value.ReplaceType(ScopeImpl, ScopeType);

ScopeType = type function(
    ScopeValues as (type text meta [
        Documentation.Description = "Select a scope.",
        Documentation.SampleValues = {"users"},
        Documentation.AllowedValues = {"audits","accounts","callDispositions","callPurposes","calls","customDuties","contentCategories","contentCategoryMemberships","duties","emailAddresses","events","favorites","mailAliases","mailboxes","mailings","opportunities","opportunityProspectRoles","opportunityStages","personas","phoneNumbers","profiles","prospects","recipients","roles","rulesets","sequenceStates","sequenceSteps","sequenceTemplates","sequences","snippets","stages","taskPriorities","tasks","teams","templates","users","webhooks"}
        ]))
        as table meta [
        Documentation.Name = "Outreach API"
    ];

ScopeImpl = (Scope as text) =>
    let
        source = Json.Document(Web.Contents(api_source_uri & Scope))
    in
        source;

The following replaces the dialog that I originally posted:

Capture.PNG

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.

Top Solution Authors
Top Kudoed Authors