Forum Discussion

tkboisvert's avatar
tkboisvert
Helper II
5 years ago

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

    • tkboisvert's avatar
      tkboisvert
      Helper II

      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;

       

       

       

       

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi,

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

         

        Thanks

        artemus  curth