cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tkboisvert
Helper I
Helper I

Custom Connector Documentation.AllowedValues not populating in service

Hello,

 

We have a custom connector using this logic:

 

 

 

[DataSource.Kind="xxxAUTH", Publish="xxxAUTH.Publish"]
shared xxxAUTH.Contents = Value.ReplaceType(xxxAUTH.BigNavTable, xxxAUTH.xxxType);

xxxAUTH.xxxType = type function (
    InputAsofDate as (type text meta [
        Documentation.FieldCaption = "As of Date",
        Documentation.FieldDescription = "Should P&L & BS values be from the first of the month to: Today or Month End?",
        Documentation.AllowedValues = { "TODAY", "MONTHEND" }
    ]),
    InputStartPeriod as (type number meta [
        Documentation.FieldCaption = "Fiscal Start Period",
        Documentation.FieldDescription = "When does your fiscal year start? If January, choose 1, if Feb, choose 2, etc..",
        Documentation.AllowedValues = { 1,2,3,4,5,6,7,8,9,10,11,12 }
    ]))
    as table meta [
        Documentation.Name = "xxx ", /* This is the title seen when filling in the parameters for the first time */
        Documentation.LongDescription = "xxx " & Extension.LoadString("Version")];

 

 

 

This works great locally ( meaning it populates the dropdown locally ) and DOES refresh through the gateway. Great!

 

https://imgur.com/SfhaMkD

 

However, when we are setting up the gateway, the dropdown only display nulls:

 
 

https://imgur.com/A6BE1zg

 

I'm on the latest version of the OPDG ( 3000.68.15. DEC 2020 rev 3 )

 

This is obviously very frustrating for my users, what can be done to fix this?

 

 

4 REPLIES 4
yingyinr
Community Support
Community Support

Hi @tkboisvert ,

Please review the content in the following link, hope it can help you resolve the problem.

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

Best Regards

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

Hello, thank you for your response.

That blog post is from 2014, before the on premise data gateway was even released.

My original code was almost copy and pasted from that blog and the other Mat Masons examples he mentions.
However, I did create a barebones connector using the linked code and the same thing happens.

 

 

 

section ParameterTest;

[DataSource.Kind="ParameterTest", Publish="ParameterTest.Publish"]
shared ParameterTest.Contents = Value.ReplaceType(ParameterTest.HelloWorld,MyFunctionType);


ParameterTest.HelloWorld = ( _Greeting as text, _TestNumber as number) =>
    let
        a = _Greeting&" from ParameterTest: " & Text.From(_TestNumber)
    in
        a;


Greeting = type text
meta
[Documentation.Description = "Please choose a greeting",
Documentation.AllowedValues = {"Hello", "Bonjour"}];
 
TestNumber = type number
meta
[Documentation.Description = "Please choose a number",
Documentation.AllowedValues = {1..5}];
//declare custom function type using custom number types
MyFunctionType = type function(
_Greeting as Greeting,
_TestNumber as TestNumber)
as text;

 

 

 

 

tkboisvert_0-1613158802611.png

 

Hi,

I have same issue ....Does anybody knows what to do?

 

Thanks

@artemus  @curth 

 

The answer from my support ticket was to request and update on the documentation pages. I will be doing this.   Wrong post. Still no answer from microsoft.

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

April Update

Check it Out!

Click here to read more about the April 2021 Updates!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

secondImage

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.